Is there a recommended way to achieve the above in a different and simple way?
If not, are there any plans to make expressions usable in simulation, '.step' and possibly more places?
Fede
Expressions are not supported in the '.step' command. The sweep variable has to be a device parameter. However, a voltage source seems to only be able to generate a single tone. Using two '.step' commands, one for each voltage source, results in many combinations that are of no interest.
*parameters
.global_param s1_mag=10m
[...]
vs1 vin vin1 sin(0 {s1_mag} {s1_freq} 0 0 0}
vs2 vin1 0 sin(0 {s2_mag} {s2_freq} 0 0 0}
[...]
.step dec s1_mag 1m 10m 5
*parameters
.global_param df=1e6 ; tone frequency spacing
.global_param lo_freq=1e9 ; carrier frequency
.global_param s1_mag=10m ; magnitude of tone s1
.global_param s1_freq={lo_freq + df} ; frequency of tone s1
.global_param s2_mag={s1_mag} ; magnitude of tone s2
.global_param s2_freq={lo_freq + 2*df} ; frequency of tone s2[...]
vs1 vin vin1 sin(0 {s1_mag} {s1_freq} 0 0 0}
vs2 vin1 0 sin(0 {s2_mag} {s2_freq} 0 0 0}
[...]
.step dec s1_mag 1m 10m 5