Back to Forums
24 posts / 0 new
Last post
#1 Jul 9, 2021
Vitali
Offline
Last seen: 2 years 1 month ago
Joined: 2021-07-09 03:35

ERROR(ORPSIM-16318): Missing or invalid expression -> Resistor Value with Supply as an input

Hello,

i basically want to change the value of the resistor over time, to simulate an MR Sensor.

with LTSpice No Problem see below: resisor gets multipied with sine source

now i struggle with pspice to get the same job done -> i want later include my pspice model in matlab for post processing as well to speed up the requency of the resistor change.

i tried several syntax for R2 {}, also now i included a current source to have the same dimensions (R=U/I). but nothing worked so far. i've spend already hours and searched the world wide web.... nothing. Maybe some of you guys can give me a hint. -> would be great to have the same formula like {2k+1k*V(V2)} for R2. Hopefully this is only a syntax error. if i put for R2 {10k-5k} everything works. But with voltage as input-> there is an error

* Profile Libraries :
* Local Libraries :
* From [PSPICE NETLIST] section of U:\cdssetup\OrCAD_PSpice\17.2.0\PSpice.ini file:
.lib "nom.lib" 

*Analysis directives: 
.TRAN  0 1 0 1m 
.OPTIONS ADVCONV
.PROBE64 V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*)) 
.INC "..\SCHEMATIC1.net" 

**** INCLUDING SCHEMATIC1.net ****
* source TEST
V_V1         V1 0 5
R_R2         V1 OUT  {1k+1K+V(V2)/I(I_I1)}  
---------------------$
ERROR(ORPSIM-16318): Missing or invalid expression
R_R3         OUT 0  5k  
V_V2         V2 0  AC 0
+SIN 0 1 2 0 0 0
I_I1         I1 0 DC 1A  

**** RESUMING Sim1.cir ****
.END

 

 

Wed, 2021-07-14 01:19
AshishG
AshishG's picture
Offline
Last seen: 1 year 4 months ago
Joined: 2021-06-29 09:20

Hi,

To model a non linear resistor or voltage controlled resistor in pspice you can directly use the part "ZX" from ANL_MISC.olb library.

It is a subckt whose defination can be found out in anl_misc.lib also stated below.

.subckt zx 1 2 3 4 5
  eout   4 6 poly(2) (1,2) (3,0) 0 0 0 0 1
  fcopy  0 3 vsense 1
  rin    1 2 1G
  vsense 6 5 0
.ends

In image shown below, V4 will be multiplied with the Resistance value provided for R2.

Between Pin 4 and pin 5 you will get required resistance value based on  V4 and R2 input.
zx.PNG

Hope it will help.

 

Wed, 2021-07-14 04:02 (Reply to #2)
Vitali
Offline
Last seen: 2 years 1 month ago
Joined: 2021-07-09 03:35

Hello Ashish,

thank you very much.

i also tried this one out. Multiplikation works.

But how i can take the floating Z output to make a summation/ subtraction with "R5" and "R6"

if I do it like that, it works, but the amplitudes are wrong:

 

Is there a shorter way like that: R5: Value = {5k+1.5k*V3} -> V3 is Sine voltage.

Wed, 2021-07-14 09:04
AshishG
AshishG's picture
Offline
Last seen: 1 year 4 months ago
Joined: 2021-06-29 09:20

Hello Vitali,

In pspice there is no shorter way like you mentioned  R5: Value = {5k+1.5k*V3} -> V3 is Sine voltage.

But I assume the performing addition and subtraction will work in the way shown below

It wll be a 2 step process

Step 1-->For addition just put the resistor in series with Z impedance 

Step2 -->For subtraction also put the resistor in series with Z impedance ( having source  interchanged to negative pin)

zx1.PNG

This will give correct amplitude for both addition and subtraction.

 

Wed, 2021-07-14 09:25
Vitali
Offline
Last seen: 2 years 1 month ago
Joined: 2021-07-09 03:35

Holy Moly! It worked!!

Thank you very much.

i would never thought of that complex setup ;)

V6 i didn't use since i could also take V4 as input X2 Pin 2.

Thanks again :)

now you made one person more happy -> You can add an additional stroke on your tally sheet regarding "how many people made i happy" :)

 

Tue, 2023-12-19 05:12
ahsan
Offline
Last seen: 3 months 3 weeks ago
Joined: 2023-12-19 05:02

i am seeing new dress for girls

Wed, 2023-12-20 03:34
Gulaal
Offline
Last seen: 4 months 1 day ago
Joined: 2023-12-20 02:48

Explore the latest and  new dress designs for any event. Whether you are looking for a simple dress or just want to update your wardrobe with new dress designs. Look for a perfect dress right now to project elegance and confidence everywhere you go.

Wed, 2023-12-20 03:37
Adoroshoes
Offline
Last seen: 4 months 1 day ago
Joined: 2023-12-20 03:16

Step up your style with adoro's collection of casual shoes for men in Pakistan. Our collection of modern and stylish designs are perfect for any occasion and provides superior comfort. Whether you're looking to dress up an outfit or just add a touch of flair to your everyday look, adoro has the perfect shoe for you! With unbeatable quality. Shop now.

Wed, 2023-12-20 04:59
Servis
Offline
Last seen: 4 months 1 day ago
Joined: 2023-12-20 04:40

Visit our online store to explore the best selection of bomber jacket for men. Discover a perfect bomber jacket to raise your fashion. Available in both standard and modern styles. Buy now!

Wed, 2023-12-20 05:02
ECS
Offline
Last seen: 4 months 1 day ago
Joined: 2023-12-20 04:17

Explore the latest Pakistani Party Dresses online. ECS presents a fantastic collection of ladies' party dresses online all over Pakistan at affordable prices. So, grab your favorite dress online today.

Wed, 2023-12-20 05:20
Borjan
Offline
Last seen: 4 months 1 day ago
Joined: 2023-12-20 02:56

Get the best loafer shoes in Pakistan from Borjan. We provide you with a variety of loafer shoes for men in Pakistan for the most affordable prices. So, make sure to get Borjan’s amazing collection of loafer shoes for men online.

Wed, 2023-12-20 06:53
nanipk
Offline
Last seen: 4 months 1 day ago
Joined: 2023-12-20 06:38

Discover the ideal baby cot for your child. Our selection provides comfortable and safe options to ensure your baby a restful night's sleep. Find the perfect baby cot that combines design, usability, and price. Buy now!

Wed, 2023-12-20 07:10
Jamnii
Offline
Last seen: 4 months 1 day ago
Joined: 2023-12-20 06:59

Check out beautiful silk dresses in pakistan at JAMNii. Our collection features stunning silk dress designs and silk suit designs that are perfect for any occasion. Elevate your style with the elegance of raw silk and indulge in the luxury of our carefully crafted pieces. Order Now for the best Silk Dresses from Jamnii

Thu, 2023-12-21 00:45
Mohagni
Offline
Last seen: 4 months 14 hours ago
Joined: 2023-12-21 00:30

Are you Looking for the best Lawn Dress Design online in Pakistan. We offer the latest designed lawn dresses with unique patterns at Mohagni. So, get your favorite lawn dress online today.

Thu, 2023-12-21 01:15
Walkeaze
Offline
Last seen: 4 months 13 hours ago
Joined: 2023-12-21 00:58

Walkeaze is the best online store for Shoes for Women in Pakistan. We provide a wide range of quality products for women such as Sandals, Slippers, Heels, and more. Grab your favorite women's shoes today.

Thu, 2023-12-21 01:19
Ammarakhan
Offline
Last seen: 4 months 13 hours ago
Joined: 2023-12-21 01:05

Shop the latest luxury dresses from Ammara Khan. Explore our collection of Pakistani luxury formals and luxury clothes. Experience elegance and style with Ammara Khan.

Thu, 2023-12-21 02:01
Nayza
Offline
Last seen: 4 months 12 hours ago
Joined: 2023-12-21 01:45

Nayza offers top-quality fitness men apperal. Get the best in comfort and style to enhance your workout experience. Shop now at Nayza!

Thu, 2023-12-21 02:31
Ahmad Shahjahan
Offline
Last seen: 4 months 12 hours ago
Joined: 2023-12-21 02:08

Visit Ahmad Shahjahan's online store to get the most affordable and high-quality unstitched fabric for shalwar kameez men. Get today to upgrade your look.

Thu, 2023-12-21 03:04
Shahtaj
Offline
Last seen: 4 months 10 hours ago
Joined: 2023-12-21 02:13

Are you looking for the best ladies dresses Pakistani? Shahtaj Qaiser presents a wide range of Pakistani dresses including traditional designs with beautiful embroidery and modern styles. Find your favorite apparel online today!

Thu, 2023-12-21 04:11
house of flowers
Offline
Last seen: 4 months 10 hours ago
Joined: 2023-12-21 03:53

Add a touch of beauty to your look with fresh flower jewellery from our collection. Handcrafted with natural flowers, our jewellery is perfect for special occasions or everyday wear. Discover unique designs and enjoy.

Thu, 2023-12-21 04:14
SoKamal
Offline
Last seen: 4 months 10 hours ago
Joined: 2023-12-21 03:00

Shop the latest collection of Silk dress design from So Kamal. Find your perfect outfit with our stunning silk dress designs and beautiful organza dress designs. Elevate your style with So Kamal.

Thu, 2023-12-21 05:26
chahyay
Offline
Last seen: 4 months 9 hours ago
Joined: 2023-12-21 05:11

Find the best track suit price in Pakistan. Chahyay offers a wide range of track suits to suit your style and budget. Shop now!

Thu, 2023-12-21 06:05
meerak
Offline
Last seen: 4 months 8 hours ago
Joined: 2023-12-21 05:31

Find the best collection of ladies dresses online at Meerak. Discover a variety of luxury dresses for women at Meerak. Order your favorite ladies dresses online at reasonable prices and enjoy.

Thu, 2024-02-15 23:15
jendy
Offline
Last seen: 2 months 3 days ago
Joined: 2022-11-23 20:55

In PSpice, you cannot directly reference voltage nodes in resistor expressions as geometry dash online you would in LTSpice. PSpice does not support this kind of dynamic resistor behavior out of the box.

Download PSpice and try it for free! Download Free Trial
Cadence