# How would I add noise to a voltage source in SystemModeler?

I have a simple circuit with a SawTooth voltage source in SystemModeler 12.0.

How would I add a noise component to a sawtooth waveform?

• I have added a NormalNoise block named normalNoise1 to my model.
• I can plot normalNoise1 in my output run.
• I would like to add normalNoise1.y to the amplitude of my SawTooth source. In my case this would be 20 + normalNoise1.y.
• When I tried using 20 + normalNoise1.y as an expression for the amplitude entry of the SawTooth source, I get an error.

My two questions are:

• Is there a good reference for the syntax for the expression editor in SystemModeler? I have looked for some examples that use expressions but am not finding anything.
• Is it even possible to use a noise block in this way?

You cannot write 20 + normalNoise1.y as the expression for the amplitude, since the amplitude is a parameter (something that you set once, and is constant during the whole simulation), and normalNoise1.y is a variable (changes during the simulation).
• Modelica.Blocks.Sources.SawTooth block (with a set amplitude, like 20)
• Modelica.Blocks.Math.Add to add the two together
• Modelica.Electrical.Analog.Sources.SignalVoltage to get the signal into your circuit