drplEvmBpsk
drplEvmBpsk(
o_waveform1
o_waveform2
n_tDelay
n_sampling
b_autoLevelDetect
n_voltage
n_offset
b_normalize
[ ?percent b_percent ]
)
=> o_waveform / nil
Description
Processes the I and Q waveform outputs from the transient simulation run to calculate the Error Vector Magnitude (EVM) and plot the I versus Q scatterplot. EVM is a useful measurement to describe the overall signal amplitude and phase modulated signal quality. It is based on a statistical error distribution normalized from an ideal digital modulation. Binary Phase Shift Keying (BPSK) is a typical modulation scheme where EVM is useful. The EVM is calculated by detecting the I and Q signal levels corresponding to the two possible I and Q symbol combinations, and calculating the difference between the signal level and the ideal signal level. Compared to other types of phase shift keying, such as QPSK, QAM16 and QAM64, BPSK has lowest bit error rate for the same signal to noise ratio.
Arguments
|
o_waveform1
|
The waveform for I signal.
|
|
o_waveform2
|
The waveform for Q signal.
|
|
n_tDelay
|
The start time for the first valid symbol. This can be obtained from the Waveform Viewer window by recording the time of the first minimum or maximum of the valid symbol (whichever is earlier), on the selected signal stream.
|
|
n_sampling
|
A period for the symbol. Each period is represented by a data rate. The data rate at the output is determined by the particular modulation scheme being used.
|
|
b_autoLevelDetect
|
Indicates that you want the amplitude, n_voltage, and DC offset, n_offset, to be calculated automatically. Amplitude is calculated by averaging the rectified voltage level of the signal streams. DC offset is calculated by averaging the sum of an equal number of positive and negative symbols in each signal stream. These values are used to determine the EVM value.
If the b_autoLevelDetect is nil, the values for n_voltage and n_offset are required. Valid values: t, nil
Default value: t
|
|
n_voltage
|
The amplitude of the signal.
|
|
n_offset
|
The DC offset value.
|
|
b_normalize
|
An option to see the scatter plot normalized to the ideal values +1 and -1 (for example, when superimposing scatter plots from different stages in the signal flow, where the levels may be different, but you want to see relative degradation or improvement in the scatter). This option does not affect the calculation of the EVM number. Valid values: t, nil
Default value: nil
|
|
?percent b_percent
|
|
|
Specifies whether to print the average EVM in percentage or in dB scale. If the value is set to t, average EVM is printed in percentage, otherwise, average EVM is printed in dB scale. Valid values: t, nil
Default value: nil
|
Value Returned
|
o_waveform
|
Returns a waveform object representing the EVM value computed from the waveforms.
|
|
nil
|
Returns nil and prints the error message if the function is unsuccessful.
|
Examples
Calculates the EVM value when b_autoLevelDetect is set to t . In this case, values are not specified for n_voltage and n_offset.
drplEvmBpsk( v("samp_out_Q"), v("samp_out_I") 1.5u, 181.81n, t, nil, nil, nil)
Calculates the EVM value when b_autoLevelDetect is set to nil. In this case, values are specified for n_voltage and n_offset.
drplEvmBpsk( v("samp_out_Q"), v("samp_out_I") 1.5u, 181.81n, nil, 1.3, 0, nil)
Return to top