Filter löschen
Filter löschen

How to use frequency analyzer(bode plotting) when I have PID controllers and PWM in my simulation Model?

9 Ansichten (letzte 30 Tage)
How to use frequency analyzer(bode plotting) when I have PID controllers and PWM in my simulation Model? When I was trying it is giving error "In "frestimate(modelname,op,io,in)", it is required for each of the linearization input I/O points that the sample time of the Simulink signal where it is located is one of the following: 1. It is either continuous or fixed in minor time step. 2. Its sample rate is equal to the sample rate of the input signal "in". The linearization I/O io(1) does not satisfy this requirement. Consider either changing the sample time of Simulink signal where io(1) is located to continuous sample time or changing the sample time of input signal "in"."

Antworten (1)

AMIT SURYAVANSHI
AMIT SURYAVANSHI am 15 Jan. 2024
Verschoben: Sam Chak am 15 Jan. 2024
% Assuming 'modelname' is your Simulink model name
model = 'modelname';
% Specify the input/output points for linearization
op = operpoint(model);
Unable to find system or file 'modelname'.
io = linearizeio(model);
% Specify sample time explicitly (adjust the sample time accordingly)
in = frest.Sinestream('Frequency',logspace(-2,2,100),'Amplitude',0.1);
% Perform frequency analysis
sys = frestimate(model, op, io, in, 'FrequencyVector', in.Frequency);
The error you are getting while trying to do frequency analysis (Bode plot) indicates that there may be a problem with the sample time of your Simulink signals. The error notice informs the user that the signal's sample time at the designated linearization input/output point is insufficient for frequency analysis.
You may want to take the following actions to deal with this issue:
Maintain Regular Sample Times:
Verify the consistency of the sample times for the input, output, and intermediate signals—the signals used in the linearization.
To comply with the specifications listed in the error message, you might need to modify the sample times in your Simulink model.
In Simulink, set the sample time:
Launch your Simulink model and examine the signal sample times.
throughout the linearization.
Adjust the signals' sample times consistently in accordance with the specifications listed in the error message.
Employ a Constant Sample Duration:
You might want to think about using continuous sample time for the linearization points if your model includes discrete sample times.
Give the sample time in fractions:
When using the frestimate function, you can define sample times manually. Make sure your Simulink signal's sample time corresponds to the one given in the frestimate function.
  3 Kommentare
Yojan
Yojan am 15 Jan. 2024
"Launch your Simulink model and examine the signal sample times.
throughout the linearization." How to examine the signal sample time continuosly and how to change the sample time. I am not getting any option for that.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by