필터 지우기
필터 지우기

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

조회 수: 9 (최근 30일)
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"."

답변 (1개)

AMIT SURYAVANSHI
AMIT SURYAVANSHI 2024년 1월 15일
이동: Sam Chak 2024년 1월 15일
% 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
Yojan
Yojan 2024년 1월 15일
이동: Sam Chak 2024년 1월 15일
It's okay @AMIT SURYAVANSHI. I try whatever you suggested.
Thank you so much
Yojan
Yojan 2024년 1월 15일
"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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Offline Frequency Response Estimation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by