What is wrong with these syntax errors?
Warning: Trouble parsing .meas test1 jmajor_axis_time
Warning: Trouble parsing .meas minor_axis_vec_rot find exp(j(major_axis_time+pi/2))
Warning: Trouble parsing .meas major_axis_vec_rot find exp(j*major_axis_time)
Major_axis_time is defined:
.meas c_fac ((horiz_mag^2)/2)cos(20) + ((vert_mag^2)/2)cos(2phase_delta):
0.200694 4e-06
.meas s_fac ((horiz_mag^2)/2)sin(20) + ((vert_mag^2)/2)sin(2phase_delta):
-0.346446 4e-06
.meas major_axis_time 0.5*atan2(c_fac, s_fac):
1.30827 4e-06
text with math operators will be auto format by forum (e.g. remove * from formula). review this post how to post text with math operators
Qspice Forum - New User to Basic User (File Upload) - QSPICE - Qorvo Tech Forum
as you are basic user, you can upload .qsch file. consider to upload your .qsch as it is harder to understand your question with only your measurement formula.
Thank you KSK. Uploading 4 pertinent .qsch files.
Polarization_Measurer_1 is top level.
I need an apreciate any help in getting embedded calculations to work. JCC
ANTENNA_INPUT.qsch (5.0 KB)
Polarization_Measurer_1.qsch (7.2 KB)
PROPAGATION.qsch (8.4 KB)
RECEIVER_INPHASE_QUAD.qsch (13.0 KB)
I assume you want to work on complex math in .tran, as J is used in the formula. (i0 is not a waveform expression in .meas)
However, J=√-1 is only available in complex data (.ac analysis) but not in real data (.tran analysis). I am not aware of any method that can convert data type from real to complex in .meas if it is a .tran analysis.
By the way, if you want your simulation to run with Qspice80.exe, you can add this option to force the simulation to run with fastmath disabled. This option will ignore what you have set in preferences.
.option fastmath=0
I just made this signal processing with an IQ mixer to calculate the magnitude and phase of two signals during simulation. I used this technique for forward and reverse power calculation, and now I have simplified it back to just calculating two signals.
This symbol can be found in this Github link
Qspice/Symbols-KSKelvin/rf/probes and meters/signal-IQmixer.qsym at main · KSKelvin-Github/Qspice
Add this symbol to compare your .meas results.
Polarization_Measurer_1 - IQmixer.qsch (11.9 KB)
Since I am not familiar with what the following math is trying to calculate (using .meas with J), I just provide the first part of math as in above example. What you need may not necessarily have to be computed in .meas.
Thank you KSK for your reply, and for the time you spent tweaking me up a symbol!
I see what you say about doing calculations inside the symbol, rather than in the post process.
Thank you for the explicit clarification of no complex in .tran.
And thanks for the .option fastmath=value.
My goal on this project is to work up calibrations for a polarization measurement, to correct for various non-idealities of the IQ mixers and PCB layouts. My initial schematic with .meas’s (and your symbol!) are the ideal case and return the same parameters as fed into my antenna input. After this verification, I’m adding parasitic delay and phase tweak errors (inside the mixers) for “simulated real life”, and thereafter a calibration process to correct back (closer) to ideality.
My plan is to move into a python supervisor to: 1) overcome the complex math limitation of .tran and save having to get all those sin() and cos() correct. 2) Script up some of the non-idealities and calibrations to allow comparison vs. ideal.
Again, thanks for your time and imparted knowledge. JCC