0
$\begingroup$

The general form of bandpass signal is given by $$s(t) = \Re\{S_b(t)\exp(j2 \pi f_ct)\}$$ How this can be represented in matlab.

$\endgroup$
1
  • $\begingroup$ Why do you want to represent it? In matlab we usually use the discrete-time representation, which is easier. $\endgroup$
    – BlackMath
    Sep 26, 2019 at 19:26

1 Answer 1

0
$\begingroup$

Usually (almost always), simulation is done using the discrete time baseband signal. Lets say you want to simulate 32 BPSK symbols (either +1 or -1). The MATLAB code for this is:

symbols = sign( rand(32, 1) - 0.5 );

Now that you have the symbols, the next step is to upsample. You can either use the MATLAB function or do it yourself:

symbols_up = upsample(symbols, samplesPerSymbol);

Then create and use a pulse shaping filter (just use rcosdesign):

pulseFilter = rcosdesign(rolloff, span, samplesPerSymbol, 'sqrt'); txSig = filter(pulseFilter, 1, symbols_up); figure, plot(txSig)

$\endgroup$
5
  • $\begingroup$ you explained it exactly... thanks. But what about real part of that equation. $\endgroup$
    – charu
    Sep 28, 2019 at 0:59
  • $\begingroup$ Yes, its part of the passband representation. I suggest you read about how communication signals are represented (baseband vs. passband). Any textbook would have this covered, or see wikipedia $\endgroup$
    – Engineer
    Sep 29, 2019 at 18:16
  • $\begingroup$ Yes.....I had understood theory pretty well but has doubt in Matlab implementation of this equation. Basically I had more equations of similar kind and hence wants to clear the concept from Matlab point of view. $\endgroup$
    – charu
    Oct 1, 2019 at 10:25
  • $\begingroup$ I'm not sure what you mean but as far as from a MATLAB implementation its pretty uncommon to actually simulate the analog signals. Computers are digital so we stick to discrete time baseband and use equations/physics to model how analog effects appear in the baseband signal. My only thought is if you want to look at passband signals is maybe look into ray tracing simulators? But I have no experience, just know that people use them and they exist $\endgroup$
    – Engineer
    Oct 1, 2019 at 13:18
  • $\begingroup$ Ok....got the point.. $\endgroup$
    – charu
    Oct 2, 2019 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.