RF circuit

Thread Starter

jchino28

Joined Mar 3, 2008
3
I'm trying to simulate my rf circuit but i need some help. I designing an RFID project and i need to know how i would simulate a mock RFID tag in PSPICE. The type of RFID card i will use, uses FSK modulation, so it will modulate data at two frequencies within a carrier. Anyone know how i can do this.
 

SgtWookie

Joined Jul 17, 2007
22,230
You could use a PWL (Piece-Wise Linear Points). This is a list of time vs voltage or time vs current. The easiest way to generate the list would be to use a spreadsheet or write a program. It's up to you to choose how many data points you wish your SPICE emulation to churn through.

Circuitmaker Student has an option in the Signal Generator source to input a filename as an external PWL source. I've looked at Linear Technology's SwitcherCad III/PSpice, but haven't been able to figure out how to import a PWL list from a file yet.
 

Ron H

Joined Apr 14, 2005
7,063
I'm trying to simulate my rf circuit but i need some help. I designing an RFID project and i need to know how i would simulate a mock RFID tag in PSPICE. The type of RFID card i will use, uses FSK modulation, so it will modulate data at two frequencies within a carrier. Anyone know how i can do this.
LTspice has a modulator that should make it very easy. I don't know if Pspice has something similar.
 

SgtWookie

Joined Jul 17, 2007
22,230
After some more poking around in LTSpice, I found the waveout.asc and wavein.asc examples in the Educational folder. This is just what you need.

Copy the waveout.asc model and use it to generate whatever signal you need in a .wav file, then use that .wav file to feed your simulation like has been done in wavein.asc
 

Ron H

Joined Apr 14, 2005
7,063
After some more poking around in LTSpice, I found the waveout.asc and wavein.asc examples in the Educational folder. This is just what you need.

Copy the waveout.asc model and use it to generate whatever signal you need in a .wav file, then use that .wav file to feed your simulation like has been done in wavein.asc
That sounds like a Rube Goldberg way of doing it. If you're going to generate the signal in LTspice, and reproduce it in LTspice, why go through the .wav file? What does that accomplish that you can't do in a single simulation?

Am I missing something?:confused:

I suppose that, if the generation sim was very slow, the .wav file method could speed up subsequent simulations of the RFID, but the modulator in LTspice is a behavioral component, so it doesn't slow down a simulation to any considerable degree.

EDIT: I have used the .wav generation feature to do a before-and-after test of a simple delta-sigma audio A/D.
 

SgtWookie

Joined Jul 17, 2007
22,230
That sounds like a Rube Goldberg way of doing it. If you're going to generate the signal in LTspice, and reproduce it in LTspice, why go through the .wav file? What does that accomplish that you can't do in a single simulation?

Am I missing something?:confused:

I suppose that, if the generation sim was very slow, the .wav file method could speed up subsequent simulations of the RFID, but the modulator in LTspice is a behavioral component, so it doesn't slow down a simulation to any considerable degree.

EDIT: I have used the .wav generation feature to do a before-and-after test of a simple delta-sigma audio A/D.
I had the wavein and waveout simulations working in mere moments.
I tried the modulator, but received cryptic error messages when I tried feeding various signals to the FM and AM inputs, and the HELP file was no help in resolving my dilemma.

So while my interim solution may not be ideal, it was a working, viable and repeatable model - which by the way, you have yet to provide. :rolleyes:

If you have a better solution, enlighten rather than denigrate.
 

SgtWookie

Joined Jul 17, 2007
22,230
Rube Goldberg, that hurts !!!
Rube Goldberg rocked ;)

His cartoons were still in the paper when I was a kid. My Grandfather was a Foreman in GE's steam turbine plant, and would read the funny papers as soon as the newspaper arrived, howling with glee at the improbable creations that existed only in Rube Goldberg's mind - and the funny pages. :D
 

Ron H

Joined Apr 14, 2005
7,063
I had the wavein and waveout simulations working in mere moments.
I tried the modulator, but received cryptic error messages when I tried feeding various signals to the FM and AM inputs, and the HELP file was no help in resolving my dilemma.

So while my interim solution may not be ideal, it was a working, viable and repeatable model - which by the way, you have yet to provide. :rolleyes:

If you have a better solution, enlighten rather than denigrate.
I'm sorry if I offended you.:( I just couldn't imagine how you generated the FSK waveform that necessitated going through the .wav write/read process. Still can't.:)
I don't believe you have enlightened us either, except to say you used the .wav writer/reader. How should one use wavein.asc to generate an FSK waveform? Perhaps by using the PWL generator, as you suggested earlier?

Below is an example of generating FSK, then amplitude-modulating a carrier, using the LTspice modulator.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
I'm sorry if I offended you.:( I just couldn't imagine how you generated the FSK waveform that necessitated going through the .wav write/read process. Still can't.:)
I don't believe you have enlightened us either, except to say you used the .wav writer/reader. How should one use wavein.asc to generate an FSK waveform? Perhaps by using the PWL generator, as you suggested earlier?

Below is an example of generating FSK, then amplitude-modulating a carrier, using the LTspice modulator.
Great - that's just what the OP needed :)

OK, in the the waveout.asc is an example (template, if you will) for generating whatever arbitrary waveforms your circuit design might need (please look at the file, in the Educational directory as I previously posted) and wavein.asc is an example on how to utilize those arbitrary waveforms in a circuit design (also in the Educational directory). One could use waveout.asc as a model to build whatever circuit necessary to generate the desired output waveform.

I did stop searching after I found those examples, but there must be examples somewhere of using the Modulator function. I just have not found them yet.
 

Ron H

Joined Apr 14, 2005
7,063
Great - that's just what the OP needed :)

OK, in the the waveout.asc is an example (template, if you will) for generating whatever arbitrary waveforms your circuit design might need (please look at the file, in the Educational directory as I previously posted) and wavein.asc is an example on how to utilize those arbitrary waveforms in a circuit design (also in the Educational directory). One could use waveout.asc as a model to build whatever circuit necessary to generate the desired output waveform.

I did stop searching after I found those examples, but there must be examples somewhere of using the Modulator function. I just have not found them yet.
The two examples I am aware of are \examples\Educational\PLL.asc and \examples\Educational\PLL2.asc. I think they are somewhat helpful, if you play with them. I agree that the help file is not very forthcoming. Here is what the help file says:
The MODULATE device is a voltage controlled oscillator. See the example schematic .\examples\Educational\PLL.asc. The instantaneous oscillation frequency is set by the voltage on the FM input. The conversion from voltage to frequency is linear and set by the two instance parameters, mark and space. Mark is the frequency when the FM input is at 1V and space is the frequency when the input is at 0V. The amplitude is set by the voltage on the AM input and defaults to 1V if that input is unused(connected to the MODULATE common).
I suppose the .wav tools would be useful if you wanted to use the same source in several different simulations. It might be simpler than copying and pasting a PWL source from one schematic to another, not to mention having the massive PWL string clutter up each schematic.
I do get a little nauseous just thinking about creating a PWL source that would duplicate the waveform I posted above. I think maybe a program would be about the only feasible way to do it.
 

SgtWookie

Joined Jul 17, 2007
22,230
On generating a PWL file - yes, you're right, it wouldn't be practical to try to enter all of that kind of data by hand. I used a PWL file yesterday to reply to another poster in regards to a problem they were having with a relay following the PWM fading of their dome lamp; the off-time increased but the on-time was constant. It was easier to write a quick program to generate the datapoints than it was to try cobbling something together inside the program.

I saw that copying/pasting a long PWL string might be an option in LTSpice - but that would be a last-ditch desperate move IMHO.
 
Top