MATLAB: Impedance vs Frequency Plot

electronicsfrequency responseMATLABmodelingsimulink

I am experienced with Matlab but still learning Simulink. I am trying to use a lumped element model to simulate a ferrite bead, but struggling to set up the simulation. The electrical circuit is just a Parallel RLC connection and a in line resistance, created from sim space blocks (See Image 1). I want run a frequency sweep to show the impedance vs frequency(see image 2) I have tried Using the impedance measurement and the DSP tool box spectrum analyzer but have not been able to connect any measurement tools to my circuit. How can I run a frequency sweep within a Simulink simulation and output a impedance vs frequency bode plot?
(Image 1)
(image 2)
Thanks for the help!

Best Answer

Simscape solves in the time-domain, so you cannot directly do a frequency sweep. You can, however, linearize the model and then perform a Bode analysis. Please see for an example of this approach.
Related Question