State-variable filters homework with LTSPICE *finished* =)  - Page 1
Forum section: electronics / beginners

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 12:09:45 pm
content: Oh, man I feel really totally sad that I would have to ruin the atmosphere here by posting such a silly and sad question here with so little professionality.The thing is, my assignment for my second year engineering electronics class is to create a State-variable filter using LTSPICE. I am running into a few problems, some of them probably wildly more silly than others.Now, the assignment is not as shown below, to find the ü (Überschwingweite - don't know how to translate that). I have found this value already. Now I must use all these volues to make a working system of the State-variable filter on LTSPICE. Sounds fun! But I am confused now. I don't know what to use for V1 (or if I need something for V1 - I have found this second order differential equation that could be used for V1, but I don't believe that I would need it- someone told me maybe I didn't need V1 for the programm to run - could that possibly be true? (I am not an LTSPICE expert, actually this is one of the first times I am using it to be honest)). So the other problem is that I don't even know how to find the reference probe/pointer…. Wow! haha. My verson of LTSPICE seems to be zoo out of date or maybe even currupted that the toolbar is not able to be shown. Is there a shortcut key to open up the probe buttonHere you can see the given info is the following:So, excuse the german language, the given info is:fo= 2kHzD = 0,2and ya, you can just see all the other data as shown from my work already.This is what I have so far:You know to close it off, if you guys would help me to figure these things out it would be so incredibly nice. I really appreciate this forum, I believe it is helping me to be more motivated to succeed in these subjects…

author: AndyC_772
author_rank: Super Contributor
timestamp: May 31, 2014, 12:26:39 pm
content: Do you get to see the menu bar? If so, you may just need to click on View --> Toolbar to make the tools appear.There's no probe button as such, though. Double click on any node to plot the voltage at that point, or single click to add the voltage plot to any axes which already exist. If you hover over a pin of a component, then the pointer changes to a different symbol which is used to plot current.

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 12:32:40 pm
content: Quote from: AndyC_772 on May 31, 2014, 12:26:39 pmI thank you so much for your honest reply, but for some reason, my version of LTSPICE does not have this. I think I will download a new LTSPICE version.Quote from: AndyC_772 on May 31, 2014, 12:26:39 pmHmm, doesn't do that either! I will download another LTSPICE. Thanks a lot!

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 01:01:22 pm
content: Quote from: intercomposed on May 31, 2014, 12:32:40 pmThe mac version of LTSPICE is really just a joke, I don't think it is even the full program what is found in the windows version. This is really sad, I don't use Mac out of preference; it is really all I have available to me.

author: Unknown
author_rank: Unknown
timestamp: May 31, 2014, 01:24:23 pm
content: Quote from: intercomposed on May 31, 2014, 01:01:22 pmOh, all the SPICE stuff is there in the native Mac version - it just doesn't have the menus for the simulation parameters, etc., so you have to be able to do it old-schoolSomeone has taken a slightly older Windows version of LTSPICE, wrapped it up in the Wine (not an) emulator, and released it for OS X. Last I tried it updated to the current version without problem, though manually adding components was a bit of a pain (due to the Windows directory structure being buried in the OS X appbundle). Googling "LTSPICE Wineskin" should find it.edit: Here's a link to the Wineskinned version -http://irust.in/2011/07/ltspice-for-mac-osx/- but it's not responding for me at the moment...

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 01:32:07 pm
content: Quote from: Tac Eht Xilef on May 31, 2014, 01:24:23 pmOh, well that's a suprising reply. I see. Well then how the heck to I use the probe to run the program??

author: Unknown
author_rank: Unknown
timestamp: May 31, 2014, 01:51:11 pm
content: Quote from: intercomposed on May 31, 2014, 01:32:07 pmRun the simulation (by clicking on the little running man icon at the top of the window), then hover the cursor over the node you want to measure. Watch the cursor turn into a probe...(But if you haven't set up your simulation parameters / SPICE directives e.g. ".tran 2m startup" or whatever, it won't run. Either read a few of the many fine articles on how to use a command-line SPICE, or see if you can find another source for that Wineskin-ed Windows version I mentioned - the Windows version of LTspice almost walks you through building the SPICE directives with a point-&-click menu...)

author: LvW
author_rank: Frequent Contributor
timestamp: May 31, 2014, 02:03:18 pm
content: Quote from: intercomposed on May 31, 2014, 12:09:45 pmHi intercomposed,as a supplement to the prgram related answers which were given already I like to mention some filter related points:1.) At first, "Überschwingweite" is a filter property to be observed in the time domain (step response). In english it is "overshoot" and can be measured/simulated using an input step. This is a result of the designed filter (depends on the given D value).2.) Your filter topolgy is known as "Tow-Thomas" structure (in case you want to google some additional information).3.) Question: Do you know the meaning of the given data (fo and D) ? These are quantities that appear in the transfer function and are related to the pole position in the complex frequency domain. If necessary, I can give you some more explanations.4.) In any case, you need the transfer function for proper dimensioning of the filter. Do you know how it is derived?

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 02:46:52 pm
content: Quote from: LvW on May 31, 2014, 02:03:18 pmHmm, yes I see this. I have the formula for the overshoot now, being Ü= e(-(pi)D/sprt(1-D2)). And it was given that D = 0.2. But you are right that I was not understanding this. How do I implement this D value into my program? I was told by another student that the type of OPAMP we are to use is the LT1014. This must be related to the D value. I would like to know more about this, is this Tow-Thomas structure something often seen, or only in this particular problem?Quote from: LvW on May 31, 2014, 02:03:18 pmI see, the transfer function. Well yes I would like to understand this much better!Quote from: LvW on May 31, 2014, 02:03:18 pmIs it the formula above?Quote from: Tac Eht Xilef on May 31, 2014, 01:51:11 pmYes, you are right, I will also look more at this. And I am still missing this in my program. You are right, that is why it is not doing anything at all…

author: LvW
author_rank: Frequent Contributor
timestamp: May 31, 2014, 03:05:24 pm
content: General questions:Where are the parts values coming from?Did you calculate the rest of the parts values? Without the transfer function?By the way - I have simulated your design. It seems to be OK.Do you know the meaning of fo and D?Answering your question regarding opamp: No - it does not matter which opamp you are going to use. For the frequency range under discussion, each type will be OK.

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 03:11:43 pm
content: Quote from: LvW on May 31, 2014, 03:05:24 pmMost of the values were already given (R and C). I am not sure about my Voltage source.What I know ishere, the overshoot: Ü= e(-(pi)D/sprt(1-D2))Uinshould actually be like this, from my notes:Uin= Uout* (1 + (1/s)(1/19.9k?) .(1/s2)(1/10k?))/((1/s2)(1/10k?))But I was really hoping I didn't need to use that.Quote from: LvW on May 31, 2014, 03:05:24 pmWow, that's awesomeI am hoping that f0is just a demonsional quality of the OPAMP, the frequency response… I have some notes, also some books that talk about this. I will go over these again.I was afraid it would get complicated and I didn't want to have to get into these details, but now I think, as I am calling these 'details', you are probably thinking it is just a basic and clear fact of life, so I should probably get caught up with the picture here!Quote from: LvW on May 31, 2014, 03:05:24 pmOhkay

author: LvW
author_rank: Frequent Contributor
timestamp: May 31, 2014, 03:15:45 pm
content: Quote from: intercomposed on May 31, 2014, 03:11:43 pmI have realized that some values were given. But what about the rest?More than that - what is your problem now?You have a circuit which looks good - what else?

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 03:29:08 pm
content: Quote from: LvW on May 31, 2014, 03:15:45 pmWell… if you really want to know everything..I think I'll have a problem exporting the images, but before that, I need to be able to get my program running, as it was said earlierQuote

author: LvW
author_rank: Frequent Contributor
timestamp: May 31, 2014, 03:33:19 pm
content: OK - so I am out of the game because your present problem is more related to the program and not to filter theory, OK?

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 03:35:56 pm
content: Quote from: LvW on May 31, 2014, 03:33:19 pmThank you very muchOhh, but I think the maybe the voltage is wrong, is it? Should I really expect this kind of linear graph?

author: LvW
author_rank: Frequent Contributor
timestamp: May 31, 2014, 04:26:18 pm
content: For an ac analysis it would be wise to use an ac source at the filters input.

author: AndyC_772
author_rank: Super Contributor
timestamp: May 31, 2014, 09:12:52 pm
content: For an ac analysis you need to specify the amplitude of the ac separately for each voltage source. It's specified separately from the dc level or waveform that's used in a transient (ie. time domain) analysis.Normally I just right click a voltage source, click 'advanced, then enter '1' in the 'ac amplitude' box. Since it's performing a small signal analysis, the actual amplitude you enter doesn't really matter since all perturbations about the dc operating point are deemed to be 'small'. It effectively just defines which is the 0dB point when you come to plot the simulation results.

author: intercomposed
author_rank: Contributor
timestamp: May 31, 2014, 09:18:08 pm
content: Hey guys, I think I got it

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: June 01, 2014, 01:00:25 am
content: Hi,I have put together a LTspice model for you. You can make the following improvements:1) the op-amp power supplies can be shared between the op-amps. You only need one +15V supply and one -15V supply.2) a source can have multiple definitions, that correspond to the different types of analysis.I have attached my models in a zip file. You can try them in the Mac version of LTspice. I generated them on a PC.Here is the AC Analysis model:AC analysis results:Transient model:Transient response:Regards,Jay_Diddy_B

author: LvW
author_rank: Frequent Contributor
timestamp: June 01, 2014, 07:51:02 am
content: Hi Intercomposed, I have sent a PM to you.LvW