Continue to Site

# how to use matlab simulate circuit?

Status
Not open for further replies.

#### Areky_qin

simulate circuit

somebody have told me matlab can simulate circuit, but how to do?
thanks

conecting matlab with pspice

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.

Cheers,
v_c

You can find some toolboxes like this one, but be careful before using since they usually are very specific.

Take a look here to see what google gives

Cheers,
v_c

draw circuits in matlab

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...

simulate circuits in 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.

Cheers,
v_c

how to use matlab in circuits

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

how to use matlab with block diagram

Thanks, i will try do it with Matlab, use spice do full system simulation would spent many time.

how to use matlab

HI, THERE,
IF YOU WOULD LIKE TO SIMULATE CIRCUITS IN MATLAB. TRY THIS COMMAND ON THE COMMAND WINDOW.

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 (sureshjobstreet@yahoo.com)

Status
Not open for further replies.