How can i add an equation to a block (impedance measurement)?

3 次查看(过去 30 天)
I have a simple RLC circuit. I added an impedance measument block to measure its impedance. But I need to add length, area etc. parameters to my system. I have an equation for this. How can I integrate this equation? So, I need to add this equation and with the R value resulting from this equation, the circuit should work and the impedance measument should measure the impedance.
I tried turning the circuit into a subsystem and adding user-defined functions, but I don't know which one I should use. many won't let me add an equation like this.

回答(1 个)

Joel Van Sickel
Joel Van Sickel 2024-1-3
You have 2 options. If it is a static value of impedance, you can pre calculate your circuit parameters such as R = R_pu*Length and put R into the resistance parameter. Or, if you need impedance to change dynamically, you can use the variable resistor and implement that equation specifically in simulink and pass it to the resistor. The same is possible for inductors and capacitors to create any impedance value that you want.
It might help to take the basic free training here: https://matlabacademy.mathworks.com/details/circuit-simulation-onramp/circuits

类别

Help CenterFile Exchange 中查找有关 S-Parameters and Linear Components 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by