Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
You can write the differential or algebraic equations for the circuit and implement them in Matlab or Simulink to simulate them.
There are also some toolboxes which has some components already build. Then all you do is draw and simulate your circuit.
Note that matlab/simulink is a block diagram (signa flow) based simulator. The output only depends on the input and whatever is in the box representing the system. It has no loading behavior. So the output can drive as many inputs as you can connect. This is not true in an electric circuit.
If you are going to simulate an circuit, I suggest that you use spice.
Added after 2 minutes:
You can find some toolboxes like this one, but be careful before using since they usually are very specific.
Yes...as v_c said try using spice for simulation. Matlab will do better only you are preparing some mathematical model. If you are still intersted have a look at the book...uploaded Circuit Anlaysis with Matlab...
by the way, many of the mathematical capabilities of matlab like lookup tables, defining transfer function in s-domain, etc. are available in most circuit simulators by using the arbitrary control sources (B-sources) and dependent sources like E (voltage-controlled voltage source), G (voltage-controlled current source), etc.
Do a Google search on "Analog Behavioral Modeling" and you will see tons of information.
All I am trying to say is that it might be easier implement purely mathematical function in spice rather than implementing circuits in Matlab. But that is just my opinion, others may disagree.
For me: Spice is a simulation engine, where device modelling( physical level) and your design iinteract with each other. This is very vital before fabrication
Else..Matlab is also very important...matahematical thing is needed...INL,DNL etc.
Both must work close Top Level: Matlab, build the circuit or block...u can get what is the value of the device, speed limitation and so on.....Here the circuit is simulte at ideal condition...if in ideal condition the circuit is working then u go to spice....
At spice we build the netlist...here the circuit is not ideal anymore where solid state plays the role...temp, humidity, silicon characteristic etc. U should design the circuit and to get the result like u had in ideal condition or close ( the Matlab result ).
This is very vital for time consuming....
p/s: Try check 1. Power Blocksheet
2. DSP Blocksheet
IF YOU WOULD LIKE TO SIMULATE CIRCUITS IN MATLAB. TRY THIS COMMAND ON THE COMMAND WINDOW.
TYPE 'simulink' and 'enter' or TYPE 'simulink3' and 'enter'.
AFTER DOING SUCH YOU WILL HAVE LOTS OF ELECTRICAL COMPONENTS WILL BE DISPLAYED. TRY BROWSE THEM ONE BY ONE AND SIMULATE THEM.
AFTER GETTING THE COMPONENTS LIST DOWN, CLICK AT THE WINDOW FOR NEW AND GO FOR NEW 'model'. AFTER GETTING THIS NEW MODEL WINDOW WHICH IS BY DEFAULT IS NAMED UNTITILED, U HAVE TO CLICK AND DRAG THE COMPONENTS TO UR WINDOWS.
LATER AFTER CONNECTING THEM BECAREFUL YOU WILL HAVE LOTS OF FEMALE AND MALE PIN COMPONENETS. WHEN CONNECTING EACH COMPONENTS IN THE CIRCUITS, U MUST HAVE A BLACK ARROW WHICH MEANS THE CONNECTION BETWEEN THE COMPONENTS ARE MADE. LETS SAY WHEN YOU CLICK AND DRAG TO CONNECT THE COMPONENTS, IF THERE'S A RED DASH LINE MEANS THERE IS NO PROPER CONNECTION.
LASTLY, GO TO SIMULATION PARAMETERS IN THE WINDOW ITSELF, AND SET THE PARAMETER ACCORDING TO WAHT U'RE SIMULATING.
I'M QUITE NEW TO SIMULINK TO HOPE I HAVE HELPED YOU WITH MY KNOWLEDGE.
BEST REGARDS : T.SURESH (email@example.com)