Options for "Filtered Signal Output

Hi!

First of all: CircuitLab is a great tool! I use it pretty much every day - except for question regarding my girlfriend - too much noise in that signal =)

Sometimes it is quite useful to see the filtered output of a high-resolution-signal as you can see in this project.

The Power of a lamp is to be controlled by a PWM driven MosFET. The original cicuit can be found on the internet - this is just a simplified copy of it.

https://www.circuitlab.com/circuit/55g5eh/mosfet_230v_dimmer/

But to gain useful information out of the Time-Domain-Simulation we have to run the signal P(LAMP1) through a Low-Pass-Filter.

https://www.circuitlab.com/circuit/jz8hya/mosfet-230v_dimmer_lowpass/

This has to be done by hand, which is quite unhandy.

Do you think it is possible to implement a Low-Pass-Filter-Output by the means of

LowPass(P(LAMP1),15)

while 15 is the cutting frequency in Hertz.

Happy to hear from you!

LeFish

by LeFish
May 14, 2015

It is normal practice in simulation tools to implement any necessary signal processing in the simulation schematic rather than as a post processing function.

As a means of applying filtering, you might find using the Laplace element slightly less unhandy:

:)

by signality
May 15, 2015

With the circuit following circuit

https://www.circuitlab.com/editor/#?id=55g5eh

I get a solution. The Laplace-Transformation is (to stay in my initial wording) VERY HANDY!

THANK YOU!

If I try to calculate the dissipated power by the expression P(LAMP1) as voltage of V7, however, I do get zeros as solution...

Is it a user error?

Best regards, LeFish

by LeFish
May 16, 2015

User error.

:)

But you have edited the schematic since you asked this question so I cannot see exactly what you had done so I am guessing that you had put P(LAMP1) into the expression for V7.

You will get nothing for this because P(LAMP1) is a function that only works on post simulation data. It does not work within a simulation.

If you want to plot the average power in LAMP1 then use this expression in V7:

(V(Last)-V(Netz))*I(LAMP1.nA)

(not V(Last)*I(LAMP1.nA) as you had when I looked at your sim because V(Last) is not exactly the voltage across the lamp.)

and when you plot the output of the Laplace block, set up a 1V source into a 1R load (V8 and R6) and then plot this:

V(TP_out)*I(R6.nA)

Then the averaged output will be in W and not V.

Note that if you plot (V(Last)-V(Netz))*I(LAMP1.nA) and P(LAMP1), the two plots should be identical but they are not.

I do not know why but it makes me question the accuracy of this (and therefore other) functions in CL.

I think that is a question for the authors of CL: so please post a Bug Report.

:)

by signality
May 16, 2015

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.