p spice simulation problem

Thread Starter

easty

Joined Dec 11, 2013
4
Hi peeps
I am new to pspice and trying to get my head round some of the functions. I am at present trying to model a pv cell and have have managed to simulate the outputs for different levels of irradiance. I am now trying to determine the max power point and the power locus. This is just basically a product of Y x X. The problem is that I have absolutely no idea how to do it. Any chance anyone could point me in the right direction. I realise this is probably just a simple command, but if you do not know then you do not know.
Cheers
Dave
 

t06afre

Joined May 11, 2009
5,934
Do you want to plot the power in some component (like say a resistor) or just the product of two values. What kind of simulator software are you are using?
Anyway this may help you. But for effect in a component. You can plot this directly from spice
Rich (BB code):
* Mult function
* Each input is added to its respective offset and then multiplied by its gain.
* The results are multiplied along with the output gain and added to the output offset. 
* Z = ( (X + x_offset) * x_gain * (Y + y_offset) * y_gain )* out_gain + out_offset
*
*
*Connections:
*            X 
*            |  Y
*            |  |  OUT
*            |  |  |
.SUBCKT MULT 1  2  3 PARAMS: x_offset=0.0 y_offset=0.0 x_gain=1.0 y_gain=1.0 out_gain=1.0 out_offset=0.0
A1 [1 2] 3 sigmult
.model sigmult mult(in_offset=[{x_offset} {y_offset}] in_gain=[{x_gain} {y_gain}]
+                   out_gain={out_gain} out_offset={out_offset})
.ENDS MULT
 

Thread Starter

easty

Joined Dec 11, 2013
4
Do you want to plot the power in some component (like say a resistor) or just the product of two values. What kind of simulator software are you are using?
Anyway this may help you. But for effect in a component. You can plot this directly from spice
Rich (BB code):
* Mult function
* Each input is added to its respective offset and then multiplied by its gain.
* The results are multiplied along with the output gain and added to the output offset. 
* Z = ( (X + x_offset) * x_gain * (Y + y_offset) * y_gain )* out_gain + out_offset
*
*
*Connections:
*            X 
*            |  Y
*            |  |  OUT
*            |  |  |
.SUBCKT MULT 1  2  3 PARAMS: x_offset=0.0 y_offset=0.0 x_gain=1.0 y_gain=1.0 out_gain=1.0 out_offset=0.0
A1 [1 2] 3 sigmult
.model sigmult mult(in_offset=[{x_offset} {y_offset}] in_gain=[{x_gain} {y_gain}]
+                   out_gain={out_gain} out_offset={out_offset})
.ENDS MULT
I wish the plot the product of 2 values. it just the current against the voltage.
I have modeled a pv cell using a netlist, for different value of irradiance. I need to now find the power curve for each level irradiance now, but do not know how to do it,

I am using the DESIGN ENTRY CIS in PSpice. It uses the Pspice A/D simulation.

Below is the code I have used.

Rich (BB code):
.include cell_1.lib
xcell1 0 31 32 cell_1 params:area=650  j0=5.84e-8 jsc=2.76e-3
vbias 31 0 dc 0
.param IR=1
virrad 32 0 dc {IR}
.step param IR list 200 400 600 800 1000
.plot dc i(vbias)
.probe
.dc vbias -0.1 0.6 0.01
.end
Rich (BB code):
*MODEL LEVEL 1
*SINGLE DIODE AND CURRENT SOURCE
*BUILT-IN SPICE DIODE MODEL D
*NODES
*	(300)REFERENCE
*	(301)OUTPUT
*	(302)INPUT, IRRADIANCE



.subckt cell_1 300 301 302 params:area=1, j0=1, jsc=1
girrad 300 301 value={(jsc/1000)*v(302)*area}

d1 301 300 diode
.model diode d(is={j0*area})
.ends cell_1
 

MikeML

Joined Oct 2, 2009
5,444
LTSpice knows how to do this intrinsically. You can run any simulation, which by default saves the voltage at each node (as a function of the independent variable of the simulation, i.e. time), and the current through each component. To show power in any component, it is as simple as holding down the Alt key while pointing to the component with the cursor. Power is plotted in Watts.

You can also do it using "waveform exressions". You can plot the expression V(node) * I (component) for example, which is power in Watts.
 

Thread Starter

easty

Joined Dec 11, 2013
4
LTSpice knows how to do this intrinsically. You can run any simulation, which by default saves the voltage at each node (as a function of the independent variable of the simulation, i.e. time), and the current through each component. To show power in any component, it is as simple as holding down the Alt key while pointing to the component with the cursor. Power is plotted in Watts.

You can also do it using "waveform exressions". You can plot the expression V(node) * I (component) for example, which is power in Watts.
Thank you, I will give it a go this afternoon. I realised it would be a simple function but as I am trying to run before I can walk with a new piece of software, sometimes the simple functions are difficult.
 

Thread Starter

easty

Joined Dec 11, 2013
4
I have uploaded the graph that I want to find the power curves for. Can anyone tell me how I can multiply the x and y axis' together?

Cheers

Dave

ps I am using net lists to generate outputs. I am not using and component design at all.
 

Attachments

t06afre

Joined May 11, 2009
5,934
Perhaps you have some export options in your charting windows. If you post your schematic (handdrawn?) and tell which spice software you use it will be more easy to help. As said before you can plot the power in any component directly from spice or a mathematical expression of two or more nodes.
 
Top