Could you please guide me on how to change the RMS value of the sine wave generator in Hypersim software using the dashboard? I have attached a picture for reference and would like to update only the green-highlighted section.
Hi Suved,
In your screenshot, =1*sqrt(2) is the amplitude A, which is the peak value of the sine wave.
The green 1 is the value you’re using as the RMS voltage, and sqrt(2) converts that RMS value into a peak value:
V_peak = V_RMS × √2
A Dashboard control can’t edit only one part of an expression like =1*sqrt(2). It sends one complete numerical value to a block parameter. So if you want to control only the RMS value and keep the √2 conversion fixed, the best approach is to move the RMS value into its own block and connect the Dashboard control to that block.
Option 1 (recommended): Control the RMS with a Constant block
Step 1: Update the model
-
Open the Sine Wave Generator block.
-
Change amplitude A from
=1*sqrt(2)to=sqrt(2). This keeps the √2 conversion fixed inside the Sine Wave Generator. -
Add a Constant block to the model and name it
Vrms. -
Set the Constant block value to
1. This block is now your controllable RMS value. -
Add a Product block.
-
Connect:
- the Sine Wave Generator output
yto one Product input - the
VrmsConstant output to the other Product input
The Product output is now: V_RMS × √2 × sin(ωt)
This gives you the same waveform as before, but the RMS value is now a separate signal you can control from the Dashboard. - the Sine Wave Generator output
-
Select the sensors on the Constant and Product blocks, then click Analyze.
Step 2: Configure the Dashboard
- Open Dashboards. If the Dashboard icon is greyed out, go to Preferences, check Enable, and restart HYPERSIM.
- Under Models, select your model and click Fetch Data.
- Under Boards, create a new panel.
- Drag a control widget, such as a Knob or Slider, onto the panel.
- Connect the widget to the
VrmsConstant block sensor. - Set the widget’s minimum and maximum values to the RMS range you want to test.
- (Optional) Add a Graph or Numeric Display connected to the Product output so you can watch the result while you change the RMS setting.
- Start the simulation and adjust the knob or slider.
The RMS value changes through the Vrms Constant block, and the √2 conversion stays fixed.
Option 2: Link amplitude A to the Constant block with an expression
You can also link the Sine Wave Generator amplitude directly to the Constant block with an expression. Set amplitude A to:
=Vrms.ATTRIBUTE*sqrt(2)
To find the correct attribute name:
- Hover over the Constant block’s value field.
- The attribute name appears in square brackets.
- Replace
ATTRIBUTEwith that name.
This links the two values, so when you change the Constant block value, amplitude A is recalculated as V_RMS × √2.
Important note about Option 2: The documentation says the expression is recalculated when values are edited in HYPERSIM. It doesn’t clearly confirm whether a value sent from the Dashboard during a running simulation also recalculates amplitude A. It’s worth testing this first. If A doesn’t update while the simulation is running, use Option 1 instead.
What to avoid
Don’t connect the Dashboard control directly to the Sine Wave Generator’s amplitude A. This overwrites the whole =1*sqrt(2) expression, so you would have to enter the peak value yourself (V_peak = V_RMS × 1.414) instead of the RMS value.
Hope this helps!
@sorfina
Thanks for the solution. Both options are good. Option 2 is more advanced. I will try option 2 if it works like option 1.
