필터 지우기
필터 지우기

How to conduct parallel modulations in Simulink?

조회 수: 10 (최근 30일)
Pavel Kuzmitsky
Pavel Kuzmitsky 2022년 4월 10일
답변: Deep 2024년 9월 17일 6:02
example:
I want to enter an array of several values into the resistor value, for example: [1 2 3] and get three signals at the output
how can this be done? the array itself cannot be entered into the parameters of the resistor

답변 (1개)

Deep
Deep 2024년 9월 17일 6:02
Hi Pavel,
Based on your question, it seems you want to simulate a circuit in Simulink using Simscape blocks, where a resistor's value can be dynamically changed through an array of values, such as [1 2 3], and observe the output for each value simultaneously. Unfortunately, Simscape components typically do not support direct array inputs for parameters like resistance, as they expect scalar values. However, there is a practical workaround that you can consider:
1.) Create a Subsystem: Encapsulate the resistor and voltmeter into a subsystem. This will allow you to replicate the setup easily.
2.) Parallel Configuration: Place multiple instances of this subsystem in parallel within your circuit. Each instance can be configured with a different resistor value from your desired array.
3.) Mask the Subsystem: You can create a mask for this subsystem to make it more user-friendly:
3.1.) Add a parameter for resistance (in ohms) to the mask.
3.2.) Set constraints for this parameter to ensure it is a non-negative, real scalar.
3.3.) Customize the icon of the masked subsystem if desired, for better visualization.
This should help you easily obtain voltage drops across different resistors independently, as was originally desired, while keeping the model visually neat and manageable. On the right side of the screenshot given below, you can see how easy it is to manage the resistance values without looking underneath the masked subsystem.
Here is a screenshot of the components under the masked subsystem:
To learn more about how Simscape works, you can refer to the help page for Basic Principles of Modeling Physical Networks:
You may find the following resources helpful to learn more about “Subsystems” and “Masking”:
I have attached the modified model in the answer for your reference. Hope this helps!

카테고리

Help CenterFile Exchange에서 Composite Components에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by