@signality posted an example “modulated sources 01” which also used CL’s Laplace Block, together with a comment of requiring a small constant for the simulation. Now I have NO idea what it is and how to use it but it sounds interesting so I gave it a try. But … it seems I don’t understand the LPB :-( Using a copy of only signality’s FM circuit I run the TDS (I've reduced time step): I see the 50Hz input (blue), the “intgrl” (orange) and the modulated FM1 (brown): a) Strange, the FM1 seems to follow the input (mod3) but is computed by using the “intgrl” node which is clearly the cosin (the integrated sin wave of mod3). To increase modulation I’ve increased the multiplier from 10 to 15 but with the same result. I dunno … ??? b) I don’t “understand” the Laplace function, but here the denominator is the time (s), thus it’s supposed to be a integrator. But what is the funny “+1p”? I increase to 1000000p but does it change anything? What is “p”? c) With “+0p” the FM1 node is dead, this is what signality wrote? I guess this is simply a bug in the solver, as the orange plot is still there, there is no reason why the FM1 should be at zero now. d) Let’s go back to “+1p”. It works again, nice. Now I want to see what CL suggested, the Laplace integrator 1/s. I add a constant voltage and the integrator: e) Even without adding the node “INT” to the plot outputs suddenly the FM1 is dead. This seems to be (another ?) bug. f) Adding the V(INT) works as expected, it integrates “1V” in 40msec to 40mV (green).
g) I make it 1/(s+1): The plot is interesting, indeed. But interactive with FM1? h) Now I try signality’s 1/(s+1p): Um, what is 1TV here? TV for “television”? So is there any help or should poor Sancho close the Laplace Block forever? Anyway, Mele Kalikimaka ! Regards, Sancho PS: Had some problems in accessing CL’s server right now ? PPS: At “Forums” the listing of recent activities is not up to date, signality’s reply to “Urgent” isn’t listed but my old reply to “charging 4 bank…” is, any problems out there? |
by Sancho_P
December 23, 2012 |
Hiya Sancho_P, ¡Feliz Navidad y próspero Año Nuevo! Not sure if this will help or hinder but here goes ... The "s" is not time in seconds. It is the Laplace Operator of the Laplace Transform. The Laplace Transform is a way to simplify the maths of time and frequency domain analysis. To be honest it is so long ago that I learned about the Laplace Transform and the Laplace Operator "s" that I can't now give you a simple explanation of how it is derived. This might help: http://www.syscompdesign.com/AppNotes/laplace-cookbook.pdf The "p" is just for pico so the 1p just means 1E-12. This is the small constant I refer to. If you can imagine a pure integrator made by an ideal opamp - with infinite gain - with an ideal capacitor from output to inverting input with a current fed into that input then 1/s represents that integrator both in terms of frequency and time domain response. Similarly, a pure differentiator formed by an ideal opamp with an ideal resistor in the feedback and an ideal capacitor to the inverting input can be represented by s. Spice has the Laplace operator but it only allows expressions - describing a (strictly linear) - transfer function - where the power of s in the numerator is at least one less than in the denominator, i.e. expressions such as:
are allowed but
are not. The other limitation is that it is not permitted to have a pure integrator as defined by
it must be in the form:
where k is a small constant. What this means in terms of a frequency response is that the opamp in the integrator has a finite gain. If you plot the frequency response of an ideal infinite gain opamp to lower and lower frequencies the gain just carries on increasing at 20dB/decade. If you plot the frequency response of an opamp with a finite gain, to lower and lower frequencies, the gain eventually flattens out at the DC gain. You can see this in the open loop frequency response of a real opamp because there is a "dominant pole" which in fact is an imperfect integrator where the corner frequency is set by this pole and the DC gain is the open loop gain of the opamp at frequencies below the dominant pole. This pole is often at only a few Hz. Now, CL says the same things about the respective powers of the numerator having to be less than that of the denominator in a Laplace Transform transfer function expression but it implies that the form
is permissible. However, as you have found it does not always work in a practical application. Trying to use an expression with
in it often causes CL simulations to fail. Now, as to what the FM stuff is all about, you have to understand that the definition of frequency is the rate of change of phase. i.e. frequency = d(phase)/dt i.e. How fast does the sine wave go through 360 degrees (2 pi radians) in a second? therefore phase = integral with respect to time of (frequency) i.e. 1 cycle at 1Hz adds up to 360 degrees, 2 cycles at 1Hz adds up to 720 deg, 10 cycles at 10 Hz accumulates to 72k deg and so on. Note that FM is the process of taking a carrier (centre) frequency and wobbling it up and down by a modulation signal. In terms of a circuit implementation, this is not quite the same as directly setting the frequency of a VCO with a control signal (voltage) which is itself modulated by another signal. It can be done that way but to generate a broadcast type FM signal is actually quite difficult. So ... if you define an oscillator using
then to properly represent frequency modulation then you have to modulate the phi part and not the f part. And before you can take an input representing the frequency (and not the frequency itself) you have to turn it into the phase of that representation of the modulation frequency. That is what the integrator does. For what I hope is a much better explanation than I have just confused you with, see: http://en.wikipedia.org/wiki/Frequency_modulation In CL, see also: https://www.circuitlab.com/circuit/ua9a82/voltage-controlled-oscillators-01/ Have a wander round some of the other examples of Laplace Transforms in CL: https://www.circuitlab.com/circuit/z25zce/laplace-single-pole/ https://www.circuitlab.com/circuit/5gcrpn/laplace-transform-step-response-and-bode-plot/ https://www.circuitlab.com/circuit/3dfhet/simple-cascaded-filters-02/ And yes, CL still does some silly things with more complex simulations that it needs to get sorted out. |
by signality
December 24, 2012 |
@Signality: “Not sure if this will help or hinder ...”
Still thinking about, sorry, did not forget, will reply! Regards, Sancho |
by Sancho_P
December 27, 2012 |
OMG, I had to read your lines again and again, I think that’s my limit. Excellent compressed information with a lot of stuff between the words, clearly you are an expert from practice, thanks a load! The Laplace cookbook seems superb for my needs (but may take weeks, if I ever get to the end, it's not only my “free” time which is very limited at the moment). Your posting also contains additional information which was new to me, but your last comment first: “And yes, CL still does some …” That’s a serious issue for a newbie, particularly when one is experimenting or trying to find hints and hidden treasures. Even if there is a crude / misleading error message you know you very likely made a mistake, but if there is only silence -? And, sorry, that’s exactly my problem even with your detailed reply which explains a lot but does not directly address my assumptions, e.g.: c) The FM signal silently died, but the intgrl signal still there at the graph - in my opinion the expression must not stop, is this a bug, OK or would it be the same in … ? (I really appreciate your comparing to His Highness because I can’t and it is at least clarifying where CL stands in its development.) e) and g) That funny crossover from one LPB to the other, better: The behavioral voltage source - is it a bug or … ? h) I’m desperate, as I was thinking of “pico” (although I didn’t understand the “no dimension”, but that’s another problem…) and as I change from 1 to “very small” I get Teravolt and a strange graph … Is it a … ? (Maybe understanding Laplace will clarify part of it) However, your FM comments are excellent. I never thought about FM modulation before, my horizon usually ends at pure 50Hz sin. I think I finally understood the frequency response and the FM modulation, at least for some minutes (when I re - read your paragraph ;-) ) I’ll follow Laplace now. Thanks again for your time to reply to such basic problems! Regards, Sancho |
by Sancho_P
January 01, 2013 |
Please sign in or create an account to comment.
CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.