Reply by July 9, 20172017-07-09
On Thursday, November 19, 2009 at 2:07:45 PM UTC+13, disney_snoopy wrote:
> Hi all, > > I would appreciate if anyone here could help me. > I was thinking to create a FM stereo with the RDS and L+R and L-R > channel in Matlab. > But i doesnt know how to do on that... > Can anyone here help me plz? > > Thankz
You need a VCO to generate the FM - one for each channel. Like cos(wct+betasin(wmt)) if it was a cosine wave. If you are not careful you will generate phase modulation and not FM. You need an integrator for the baseband signal before modulation I think. Demodulation is easy - use a PLL on MATLAB. You may also want to do pre-emphasis etc
Reply by July 8, 20172017-07-08
On Wednesday, November 18, 2009 at 5:07:45 PM UTC-8, disney_snoopy wrote:
> Hi all, > > I would appreciate if anyone here could help me. > I was thinking to create a FM stereo with the RDS and L+R and L-R > channel in Matlab. > But i doesnt know how to do on that... > Can anyone here help me plz? > > Thankz
Reply by Robert Orban January 6, 20102010-01-06
In article <6748e7fe-9cbe-408f-8fa9-
ff1105bf8260@g22g2000prf.googlegroups.com>, disney_snoopy@hotmail.com 
says...
> > >Hi all, > >I would appreciate if anyone here could help me. >I was thinking to create a FM stereo with the RDS and L+R and L-R >channel in Matlab. >But i doesnt know how to do on that... >Can anyone here help me plz? > >Thankz
(use a monospaced font for the text below) The FM stereo encoding equation, where w = 2 pi 38000 is: #1: comp(L, R) := (L + R) + (L - R)&#4294967295;COS(w&#4294967295;t) + 0.09&#4294967295;COS(w/2&#4294967295;t) The decoding equations using synchronous demodulation are: #2: Lout = comp(L, R)&#4294967295;(0.5 + COS(w&#4294967295;t)) #3: Rout = comp(L, R)&#4294967295;(0.5 - COS(w&#4294967295;t)) Substituting #1 into #2 and #3 and simplifying gives: ( 3&#4294967295;w&#4294967295;t ) ( w&#4294967295;t ) 9&#4294967295;COS(-------) 9&#4294967295;COS|-----| #4: ( 2 ) ( 2 ) (L - R)&#4294967295;COS(2&#4294967295;w&#4294967295;t) Lout = ---------------- + -------------- + -------------------- + 200 100 2 (3&#4294967295;L + R)&#4294967295;COS(w&#4294967295;t) -------------------- + L 2 ( 3&#4294967295;w&#4294967295;t ) 9&#4294967295;COS|-------| #5: ( 2 ) (R - L)&#4294967295;COS(2&#4294967295;w&#4294967295;t) Rout = - ---------------- + -------------------- - 200 2 (L + 3&#4294967295;R)&#4294967295;COS(w&#4294967295;t) -------------------- + R 2 This shows that L and R appear in the outputs of the synchronous demodulator as desired, but there are a number of other terms as well. Assuming that L and R are spectrally limited to less than 19 kHz, L and R can be separated from the remaining terms by applying lowpass filters to #4 and #5 because in this case, the lowest spectral component of the "other terms" is 19 kHz. Typically, the lopwass filters used have a passband to 15 kHz and a stopband beginning at 19 kHz, but nothing in the physics of the system prevents audio response to 19 kHz - (some very small delta). As for the MATLAB implementation of the above, this is an "exercise for the reader."
Reply by glen herrmannsfeldt November 30, 20092009-11-30
Jerry Avins <jya@ieee.org> wrote:
(snip)
 
> I have to second that on the evidence that L+R is the mono signal that > any receiver will pick up. The multiplexed part riding on the 38 KHz > carrier is L-R. Stereo vinyl disks are the same way. L+R is the > horizontal movement of the stylus that a mono player will respond to, > while L-R is the encoded in vertical motion. That's what makes it > _compatible_ stereo.
The story I remember being that horizontal motion for mono records (vinyl now, but I believe originally something else) such that bearing noise was not picked up. Somehow that problem was solved before stereo came out. The other description is that one wall of the groove has the left channel, the other the right channel. As I understand it, the record cutters use L+R and L-R, but playback is done L and R with the appropriate coordinate rotation. Also, FM stereo is described with the 38kHz subcarrier, but, since the amplitude of the subcarrier is just right, also as switching between the two channels at 38kHz. (Filter out any higher order components.) With a sample rate a multiple of 38kHz it would be especially easy to generate the signal. -- glen
Reply by Jerry Avins November 30, 20092009-11-30
Randy Yates wrote:
> disney_snoopy <disney_snoopy@hotmail.com> writes: > >> On Nov 30, 1:42 pm, Randy Yates <ya...@ieee.org> wrote: >>> glen herrmannsfeldt <g...@ugcs.caltech.edu> writes: >>>> disney_snoopy <disney_sno...@hotmail.com> wrote: >>>>> my input audio signal is 1kHz and my sampling freq is 200kHz. >>>>> Please help! >>>> Generate sum and difference, generate pilot signal, generate AMSC >>>> subcarrier with the appropriate phase, add all three together. >>>> A little more complicated since 200 isn't a multiple of 38. >>> glen, even his specification is incomplete. The input audio should >>> be STEREO, i.e., left and right. >>> -- >>> Randy Yates % "Maybe one day I'll feel her cold embrace, >>> Digital Signal Labs % and kiss her interface, >>> mailto://ya...@ieee.org % til then, I'll leave her alone."http://www.digitalsignallabs.com% 'Yours Truly, 2095', *Time*, ELO >> Hi Glen and Randy, >> >> This is my DSP project. >> what i am doing is use a software to prove the FM stereo is work which >> i >> can get the outlook structure to this FM stereo broadcast. After get >> the >> FM stereo structured, apply an audio frequency to this FM stereo and >> calculate out the THD. >> >> What i know from here is the L+R region is 50Hz to 15kHz. How to >> implement >> it to the Matlab i really no idea. Hence, now im finding for help or >> comment on which command i should use to implement the L+R region. >> I tried to use multiband coding for this region but i found that i >> cant code my pilot frequency. >> The only thing that i can do in this Matlab now is only the pilot >> freq. >> >> So now do you all get what i mean and what i want? > > Not really. I'm not good at inferring meaning from poorly-constructed > sentences. > > However, I'm almost positive that if you read this: > > http://en.wikipedia.org/wiki/FM_broadcasting#Modulation_characteristics > > and can really understand it, especially the section entitled "FM > stereo," then you will have answered many of your own questions. > > It seems you've put the cart before the horse and you are trying > to implement a system that you really don't understand - that will > never work.
I have to second that on the evidence that L+R is the mono signal that any receiver will pick up. The multiplexed part riding on the 38 KHz carrier is L-R. Stereo vinyl disks are the same way. L+R is the horizontal movement of the stylus that a mono player will respond to, while L-R is the encoded in vertical motion. That's what makes it _compatible_ stereo. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Reply by Randy Yates November 30, 20092009-11-30
disney_snoopy <disney_snoopy@hotmail.com> writes:

> On Nov 30, 2:20&nbsp;pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: >> Randy Yates <ya...@ieee.org> wrote: >> > glen, even his specification is incomplete. The input audio should >> > be STEREO, i.e., left and right. >> >> I thought about mentioning that, but decided not to. >> >> Otherwise, it is much easier to create the stereo signal with >> a mono source... >> >> -- glen > > Coding below is i use to code the pilot freq. > > x3 = ((0.5*sin(2*pi*19000*t1))+ (randn(size(t1)))); > > [f3] = pmtm(x3,4,65536,fs);
[Pardon me, glen, for stepping in here...] You probably don't want to do things this way. What you probably want to do is first create the sum (s(t)), difference (d(t)), and pilot (p(t)) signals, then sum them to get a composite baseband signal: b(t) = s(t) + d(t) + p(t) Then FM-modulate b(t). Then add the (possibly complex) noise as the final step. Rethinking this whole situation, this problem is probably too advanced for you at this stage. You need to try a few simpler experiments in Matlab first and learn some of the terininology, concepts, and techniques, before tackling a full FM stereo modulator. -- Randy Yates % "Maybe one day I'll feel her cold embrace, Digital Signal Labs % and kiss her interface, mailto://yates@ieee.org % til then, I'll leave her alone." http://www.digitalsignallabs.com % 'Yours Truly, 2095', *Time*, ELO
Reply by Randy Yates November 30, 20092009-11-30
disney_snoopy <disney_snoopy@hotmail.com> writes:

> On Nov 30, 1:42&nbsp;pm, Randy Yates <ya...@ieee.org> wrote: >> glen herrmannsfeldt <g...@ugcs.caltech.edu> writes: >> > disney_snoopy <disney_sno...@hotmail.com> wrote: >> >> >> my input audio signal is 1kHz and my sampling freq is 200kHz. >> >> Please help! >> >> > Generate sum and difference, generate pilot signal, generate AMSC >> > subcarrier with the appropriate phase, add all three together. >> >> > A little more complicated since 200 isn't a multiple of 38. >> >> glen, even his specification is incomplete. The input audio should >> be STEREO, i.e., left and right. >> -- >> Randy Yates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;% "Maybe one day I'll feel her cold embrace, >> Digital Signal Labs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;% &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and kiss her interface, >> mailto://ya...@ieee.org &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;% &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;til then, I'll leave her alone."http://www.digitalsignallabs.com% &nbsp; &nbsp; &nbsp; &nbsp;'Yours Truly, 2095', *Time*, ELO &nbsp; > > Hi Glen and Randy, > > This is my DSP project. > what i am doing is use a software to prove the FM stereo is work which > i > can get the outlook structure to this FM stereo broadcast. After get > the > FM stereo structured, apply an audio frequency to this FM stereo and > calculate out the THD. > > What i know from here is the L+R region is 50Hz to 15kHz. How to > implement > it to the Matlab i really no idea. Hence, now im finding for help or > comment on which command i should use to implement the L+R region. > I tried to use multiband coding for this region but i found that i > cant code my pilot frequency. > The only thing that i can do in this Matlab now is only the pilot > freq. > > So now do you all get what i mean and what i want?
Not really. I'm not good at inferring meaning from poorly-constructed sentences. However, I'm almost positive that if you read this: http://en.wikipedia.org/wiki/FM_broadcasting#Modulation_characteristics and can really understand it, especially the section entitled "FM stereo," then you will have answered many of your own questions. It seems you've put the cart before the horse and you are trying to implement a system that you really don't understand - that will never work. -- Randy Yates % "And all you had to say Digital Signal Labs % was that you were mailto://yates@ieee.org % gonna stay." http://www.digitalsignallabs.com % Getting To The Point', *Balance of Power*, ELO
Reply by disney_snoopy November 30, 20092009-11-30
On Nov 30, 2:20&#4294967295;pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> Randy Yates <ya...@ieee.org> wrote: > > glen, even his specification is incomplete. The input audio should > > be STEREO, i.e., left and right. > > I thought about mentioning that, but decided not to. > > Otherwise, it is much easier to create the stereo signal with > a mono source... > > -- glen
Coding below is i use to code the pilot freq. x3 = ((0.5*sin(2*pi*19000*t1))+ (randn(size(t1)))); [f3] = pmtm(x3,4,65536,fs); While for the L+R i cant use this to code.
Reply by disney_snoopy November 30, 20092009-11-30
On Nov 30, 1:42&#4294967295;pm, Randy Yates <ya...@ieee.org> wrote:
> glen herrmannsfeldt <g...@ugcs.caltech.edu> writes: > > disney_snoopy <disney_sno...@hotmail.com> wrote: > > >> my input audio signal is 1kHz and my sampling freq is 200kHz. > >> Please help! > > > Generate sum and difference, generate pilot signal, generate AMSC > > subcarrier with the appropriate phase, add all three together. > > > A little more complicated since 200 isn't a multiple of 38. > > glen, even his specification is incomplete. The input audio should > be STEREO, i.e., left and right. > -- > Randy Yates &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% "Maybe one day I'll feel her cold embrace, > Digital Signal Labs &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;and kiss her interface, > mailto://ya...@ieee.org &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;til then, I'll leave her alone."http://www.digitalsignallabs.com% &#4294967295; &#4294967295; &#4294967295; &#4294967295;'Yours Truly, 2095', *Time*, ELO &#4294967295;
Hi Glen and Randy, This is my DSP project. what i am doing is use a software to prove the FM stereo is work which i can get the outlook structure to this FM stereo broadcast. After get the FM stereo structured, apply an audio frequency to this FM stereo and calculate out the THD. What i know from here is the L+R region is 50Hz to 15kHz. How to implement it to the Matlab i really no idea. Hence, now im finding for help or comment on which command i should use to implement the L+R region. I tried to use multiband coding for this region but i found that i cant code my pilot frequency. The only thing that i can do in this Matlab now is only the pilot freq. So now do you all get what i mean and what i want? Thankz
Reply by glen herrmannsfeldt November 30, 20092009-11-30
Randy Yates <yates@ieee.org> wrote:
 
> glen, even his specification is incomplete. The input audio should > be STEREO, i.e., left and right.
I thought about mentioning that, but decided not to. Otherwise, it is much easier to create the stereo signal with a mono source... -- glen