How to plot bode (Vout/Vin) of a circuit model in simulink?

61 visualizzazioni (ultimi 30 giorni)
Peter
Peter il 23 Lug 2025
Commentato: Peter il 14 Ago 2025 alle 12:23
I have designed an isolated boost converter in simulink and the model is attached herewith. To design the closed loop controller of the model, I wanted to plot the bode of circuit using 'linearization' option in simulink. To plot the bode, I used the following steps:
  1. Used a controlled voltage source for the input.
  2. Added a 'Sum' block to the input voltage block to add an input perturbation.
  3. Selected the perturbation signal as 'input perturbation' in 'linearization' tab.
  4. Selected the measured output voltage signal as 'open loop output' in 'linearization' tab.
  1. Clicked on 'Model Linearizer'
  2. Clicked on 'Bode' in the pop-up window.
  3. I got a bode plot
But the obtained bode plot is incorrect and the gain is completly in the negative direction. What step I can change to obtain the correct bode plot? Also how can I generate the corresponding transfer function?
  8 Commenti
Paul
Paul il 14 Ago 2025 alle 12:01
Hi Peter,
What did you do differently to generate the correct plot as compared to the original plot in the original question?
Peter
Peter il 14 Ago 2025 alle 12:23
I used the "Bode Plot" block as Sam mentioned in the previous comment and specified the steady state time while plotting.

Accedi per commentare.

Risposte (1)

S@m
S@m il 6 Ago 2025 alle 10:58
Modificato: S@m il 6 Ago 2025 alle 11:05
Hi Peter,
The 'Model Linearizer' in the Simulink linearizes the system about an operating point. By default, the initial condition at t = 0 sec is considered as the operating point. When designing the closed loop controller, the model must be linearized about a suitable operating point such as the desired steady state at t = 0.01 sec in this case (check the output response in the scope for steady state - shown in the below figure).
To set the operating point at the steady state, proceed with the below steps.
Step 1: Click on the ‘Operating Point’ drop down menu and select ‘Linearize At…’ option.
Step 2: Enter Simulation snapshot time as 0.01 s and apply. This would pick the state at simulation time 0.01s and set it as the operating point.
Step 3: Click on Bode to generate the bode plot for the linearized model. Observe that the bode plot in below figure now has positive gain over certain frequency range. For transfer function, right click on ‘linsys1’ in Linear Analysis Workspace and choose ‘Open selection’ option.
Step 4: A window as shown below would open up. Select ‘Transfer Function’ in ‘Display linearization result as’ drop down menu.
For more details on setting operating point in Model Linearizer, refer to the examples in the below link:
  1 Commento
Peter
Peter il 14 Ago 2025 alle 6:12
Modificato: Peter il 14 Ago 2025 alle 6:13
@S@m.. Thank you for your answer. It was really helpful. I followed the steps and I was able to plot the bode. But I have two questions:
Q1: For the bode wrt input voltage, what might be the reason for getting negative gain for the lower frequency sweep? I was expecting a 0 gain.
Q2: I wanted to plot the bode wrt the input duty. I followed the same steps and as you can see, the plot is not correct. It seems like the perturbation has no effect. How can I solve it?

Accedi per commentare.

Categorie

Scopri di più su Linearization in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by