Analog electrical voltage or current

LAUNCH

ANALOG AND DIGITAL SIGNALS

The sign is originally produced is within the type of present or an electric voltage, created for instance various other kind of transducer or with a microphone. The result in the readout program of the CD (small disk) participant, the information has already been in electronic form. Before DSP methods could be utilized an analog transmission should be changed into electronic type. An electric voltage sign, for instance, could be digitized utilizing an electric routine named an -to-electronic converter. An electronic productivity is generated by this like a flow of binary figures whose ideals represent the electric voltage feedback towards the system at each sample instant.

Electronic signal control (DSP)-electronic illustration of signals and also the utilization of electronic processors to investigate, alter, or extract data from indicators. Several indicators in DSP derive from analogue indicators which changed into electronic form and have been tried at frequent times. The crucial benefits of DSP over analogue running are

  • Guaranteed precision (based on the amount of pieces employed)
  • Ideal reproducibility
  • No float in efficiency because of heat or era
  • Requires benefit of improvements in semiconductor engineering
  • Higher freedom (could be reprogrammed without changing equipment)
  • Exceptional efficiency (linear phase reaction feasible, and selection
  • Calculations could be made flexible)
  • Occasionally data might currently maintain electronic form.
  • You will find nevertheless (nevertheless) some drawbacks
  • Pace and price (DSP style and equipment might be costly, particularly with high-bandwidth indicators)
  • Limited word-length issues (restricted quantity of pieces could cause destruction).

Software regions of DSP are substantial:

  1. Image-processing (pattern identification, automatic perspective, picture improvement, facsimile, satellite temperature chart, cartoon)
  2. Instrumentation and control (range evaluation, placement and price control, noise-reduction, data-compression)
  3. Talk and audio (speech recognition, speech activity, text-to-speech, digital-audio, equalisation)
  4. Military (safe conversation, radar processing, sonar processing, rocket assistance)
  5. Telecommunications (echo cancellation, flexible equalisation, spread spectrum, video-conferencing, data-communication)
  6. Biomedical (individual tracking, readers, EEG mind mappers, ECG evaluation, x ray storage and improvement).

INTRODUCTION TO CDMA

Code Section Multiple Entry (CDMA) is just a significantly new idea in wireless communications. It's acquired popular worldwide approval by mobile stereo program providers being an update that'll significantly improve both the support quality and also their program capability. the most of the champions of America Personal Communications Program range auctions has similarly selected for implementation it. It might seem, nevertheless, mystical for individuals who aren't strange with it.

CDMA is just a type of spread spectrum, a household of electronic connection methods which have been utilized in military programs for several years. Spread spectrum's primary theory may be the utilization of like provider waves - sound, and, whilst the title suggests, bandwidths significantly broader than that necessary for stage that is easy -to-point conversation in the same data-rate. Initially there have been two motives: possibly to avoid adversary initiatives to jam the communications (anti-jam, or AJ), or even to conceal the truth that conversation was actually happening, occasionally termed low-probability of intercept (LPI). It's a brief history that dates back towards World War II's beginning.

The usage of CDMA for cellular stereo programs that are private is book. It had been suggested theoretically within the 1940is, until 40 years later however the request within the private market didn't occur. Industrial programs became feasible due to two major improvements. One was really low price, high-density digital circuits, which decrease the dimension, fat, and cost of the customer channels to an low level's availability. Another was the conclusion that multiple-access conversation that is optimum demands that their transmitter forces are regulated by all consumer channels towards the cheapest that'll accomplish sufficient transmission quality.

The character of the customer stop changes from the predominately device to some electronic system that is mainly. Traditional stereo devices individual stations or channels by selection within the frequency area. CDMA devices don't remove analog running completely, however they separate connection stations in the shape of a pseudorandom modulation that's utilized and eliminated about the foundation of consistency, not within the electronic site. Exactly the same frequency band is occupied by numerous people. This frequency reuse that is common isn't fortuitous. On the other hand, it's essential to the large spectral effectiveness that's CDMA's sign. Why that is accurate additional conversations in these websites display.

CDMA is changing the face area of mobile and Computers conversation by:

  • Significantly enhancing the phone traffic capability
  • Significantly enhancing the speech quality and removing the clear ramifications of multipath fading
  • Lowering the occurrence of fallen calls because of handoff problems
  • Supplying reliable transportation system for information communications, for example facsimile and web traffic
  • Lowering the amount of websites had a need to help any given quantity of traffic
  • Simplifying site choice
  • Lowering implementation and running costs since less cell sites are essential
  • Lowering typical given energy
  • Minimizing disturbance to additional electronics
  • Lowering possible health problems

Commercially launched in 1995, CDMA rapidly turned among the planetis fastest-growing wireless systems. In 1999, the Global Telecommunications Nation chosen CDMA whilst the industry-standard for brand new "third-era" (3G) wireless devices. Several top wireless companies improving or are now actually creating to 3G CDMA systems to be able to supply more convenience of speech traffic, along side high speed data features.

DS_CDMA

Multiple-access systems-based on DS CDMA have accomplished growing importance for cellular communications programs. There is a idea dependant on DS_CDMA implementing MRC in the recipient. MRC takes benefit of the route variety to fight the fading. Nevertheless the DS_CDMA system's capability is restricted by both multi-user inter symbol interference and disturbance ISI in high-data rate programs.

OFDM is put on fight the frequency selectivity of the funnel utilizing an easy one-tap equalizer additionally OFDM stops the ISI and inter provider disturbance ICI by placing a shield period between adjacent OFDM symbols OFDM is usually employed for audio Television and HDTV sign over terrestrial stations and defines superior spectral performance.

The CMDA Engineering summary

FDMA

In slots, the frequency group is split in Volume Division Multiple Entry. Each person gets one consistency position designated that's employed at-will. It may be when compared with broadcasting stereo or AM where each stop includes a volume designated. Great selection is demanded by fDMA.

TDMA

In-Time Division Multiple Entry, the frequency group is unpartitioned but customers are permitted to utilize it just in predetermined times of time a time. Hence, TDMA needs synchronization one of the customers.

CDMA

CDMA, for Signal Section Multiple Entry, differs from its conventional ways it generally does not spend amount of time or consistency in person slots but provides the to utilize equally to all customers simultaneously. It runs on the method referred to as Spread-Spectrum to get this done. Essentially, each person is designated a signal,which advances its transmission bandwidth in this method that it can be recovered by just the code in the recipient end. This technique has got the home the undesirable signs with various rules get spread much more from the procedure, producing them towards the recipient like sound.

Spread Spectrum

Spread Spectrum is just a mean of indication where a bigger bandwidth is occupied by the information than required. Bandwidth scattering is achieved through the usage of a signal, that will be in addition to the given information prior to the indication. Exactly the same signal can be used to demodulate the data. The next number demonstrate the scattering completed about the information transmission x(t) from the spreading sign d(t) leading to the concept signal-to be sent, m(t).

Initially for military use to prevent performing (disturbance produced purposely to create a conversation route useless), spread spectrum modulation has become utilized in individual communication methods because of its exceptional efficiency within an interference centered atmosphere.

Description of Spread Spectrum:

A sign method where a pseudo-sound signal, in addition to the info information, is utilized like a modulation waveform to “spread” the sign power than the sign info bandwidth over a bandwidth significantly more. In the recipient the sign is “despread” utilizing a synchronized reproduction of the -sound signal.

Basic Theory of Spread Spectrum System:

The Main kinds of Spread-Spectrum are Immediate Collection (DS), and Frequency-Hopping (FH). An overview of those methods is hereby provided:

Pseudo change of the stage pseudo change of the consistency

Coherent demodulation noncoherent

Direct Sequence Spread Spectrum (DSSS)

A pseudo-sound series pnt produced in the modulator, can be used along with a Mary PSK modulation to change the stage of the PSK sign pseudo randomly, in the chipping price Rc (=1/Tc) an interest rate that's integer multiple of the image price Rs (=1/Ts).

The processor price and from the base-band selection determines the given bandwidth. The execution limits the most processor rate Rc (time price) and therefore the most scattering. a demodulation is required by the PSK modulation system.

PN signal size that's considerably longer than the usual information symbol, to ensure that there is another processor routine related to each symbol.

Frequency Hopping Spread Spectrum

A Pseudo-sound series pnt produced in the modulator can be used in conjuction having an Mary FSK modulation to change the FSK sign pseudurandomly's service volume, in the rate Rh that is jumping. The given signal occupies numerous wavelengths in time, each to get an amount of time Th (= 1/Rh), known as live time. The bandwidth separates and trips between these stations based on the PN sequence. At each volume jump period the PN generator feeds the frequency synthesizer a consistency term FW (a series of n chips) which determines among 2n consistency placement fhl. Recipient and transmitter uses exactly the same frequency jump routine.

The given bandwidth is dependent upon the cheapest and greatest jump placement from the bandwidth per jump placement (?fch). To get a jump that was given, immediate busy bandwidth may be the traditional M-FSK, that will be usually significantly smaller than Wss. Therefore the FHSS signal is just a narrowband transmission, all sign energy is focused on a single channel. Averaged over several trips, the FH/M-FSK range occupies the whole spread spectrum bandwidth. It may be jumped over a significantly broader bandwidth than an DSSS system since the bandwidth of an FHSS system just depends upon the tuning selection.

Because the trips usually lead to stage discontinuity (with respect to the specific execution) a noncoherent demodulation is performed at recipient. With jumping that is slow you will find numerous information with quickly jumping you will find numerous trips per information image per jump and symbol.

3.3 Fundamental theory of Direct Sequence Spread Spectrum

For BPSK modulation the inspiration of the DSSS program are:

Input:

Binary information dt with image price Rs = 1/Ts (=bitrate Rb for BPSK)

Pseudo-sound signal pnt with processor price Rc = 1/Tc (an integer of Rs)

Spreading:

Within The transmitter, the binary information dt (for BPSK, I and Q for QPSK) is

‘directly' increased using the PN series pnt, that will be in addition to the binary information, to create the given baseband transmission txb:

txb = dt. pnt

Multiplication of dt having a PN sequence's result would be to distribute dt's bandwidth Rs .

Despreading:

The spread spectrum sign CAn't be discovered with a traditional narrowband radio. Using the PN series pnr, the transmission rxb is increased within the recipient.

If pnr = pnt and synchronized within the obtained information towards the PN series, compared to recovered data is created on doctor. Multiplication of the spread spectrum sign rxb using the PN series pnt utilized in the transmitter's result would be to despread rxb's bandwidth .

If pnr ? pnt, than there's no dispreading motion. The sign doctor includes a spread spectrum. A recipient being unsure of the PN series of the transmitter can't replicate the information that is given.

Efficiency within the existence of disturbance:

To simplify the current presence of disturbance, the spread array program is recognized as for baseband BPSK conversation (without selection).

The obtained transmission rxb of the given sign txb plus a chemical inteferance i (sound, additional customers, jammer,……):

rxb = t xb + i = dt. pnt + i

To recuperate the initial information dt the acquired transmission rx0 is increased having a locally produced PN series pnr that's a precise reproduction of this utilized in the transmitter (that's pnr = pnt and synchronized) The multiplier result is consequently distributed by:

dr = rxb. pnt = dt. pnt. pnt + i. pnt

the PN series pnt, where-as the undesirable inteferance i is increased only one time multiplies twice the information sign dt.

Because of the home of the PN series:

pnt + pnt = +1 for several t

The multiplier result becomes:

dr = dt + i. pnt

The information sign doctor is produced aside from the inteferance displayed from the chemical expression i, in the multiplier result within the recipient. pnt. Multiplication of the inteferance from the PN series that is locally produced, implies that the inteferance wills influence just like it did in the transmitter using the info showing sign. Inteferance and sound, being uncorrelated using the PN series, becomes sound- like and reduction following the multiplier in energy density.

After dispreading, the information element dt is narrow-band (Rb) while the inteferance element is wideband (Rc). By making use of the doctor signal to some baseband (reduced-move) filter having a band-width simply big enough to support the restoration of the information sign, all of the inteferance element i is blocked out. The result of inteferance is decreased by running gain (Gp).

Inteferance:

the multiplication using the PN series pnr of the recipient spreads the sound. The noise's ability occurrence is decreased to the data transmission with respect. Only one/Gp of the initial sound energy is left within the info baseband (Rs). Dispreading and distributing allows a bandwidth industry for control gain against narrow-band . Traditional narrow-band devices would be disabled by narrow-band inteferance.

The substance behind the inteferance denial capacity for a spread array program: the helpful sign (information) gets increased twice from the PN series, however the inteferance sign get increased only one time.

Wideband disturbance:

Multiplication of the acquired transmission using the PN series of the recipient gets a particular despread of the information sign (smaller bandwidth, higher-power density). The sign that is inteferance it is spread and is uncorrelated using the PN series.

Source of wideband sound:

Numerous Spread Spectrum person: multiple-access system.

Gaussian Noise: There's no escalation in SNR with spread range: The big station bandwidth (Rc in the place of Rs) boost the obtained noise energy with Gp:

Ninfo = N0. BWinfo à Nss = N0. BWss = Ninfo.Gp

The spread spectrum signal includes a lower-power density compared to signal that is straight transmitted.

Code-division multiple-access (CDMA) is just a methode of multiplexing (instant) customers unique (orthogonal) rules. All customers may transfer in the same period, and each is designated the whole accessible frequency range for sign. CDMA can also be called Spread Spectrum multiple-access (SSMA).

CDMA serving not need FDMA's bandwidth percentage, or TDMA was required in by the full time synchronization of the person customers. A CDMA person has full-time and complete bandwidth available, however the quality of the conversation reduces by having an escalating quantity of customers (BER).

In CDMA each person:

  • Has it is own PN signal
  • Employs the exact same RF bandwidth
  • Sends concurrently (asynchronous or synchronous)

Relationship of the baseband spread spectrum sign rxb using person 1's PN series just despreads person 1's sign. Another person creates sound Nu for person 1.

ACCESS STRATEGIES

For stereo systems-there are period, consistency and two assets. Department by consistency, to ensure that each set of communicators is designated area of the range for several of times, leads to Consistency Division Multiple Entry (FDMA). Department by period, to ensure that each set of communicators is designated all (or atleast a sizable component) of the range for part of the time leads to Period Division Multiple Entry (TDMA). In Signal Section Multiple Entry (CDMA), every communicator is likely to be designated the whole range all the period. CDMA uses contacts to be identified by rules.

POWERCONTROL

CDMA is interference minimal multiple-access program. Since all customers transfer on a single consistency, inner disturbance produced from the program may be the most critical element in identifying phone quality and program capability. The transfer energy for every person should be decreased to control disturbance, nevertheless, the ability ought to be enough to keep the necessary Eb/Number (signal-to-noise rate) to get a sufficient phone quality. When Eb/Number of each person reaches the minimal degree required for the appropriate route efficiency optimum capability is accomplished. Whilst the MS goes around, the RF atmosphere constantly changes because of exterior disturbance, quick and slow-fading, shadowing, along with other elements. The purpose of the energy handle that is powerful would be to restrict power that is given on both links while sustaining link quality. Extra benefits are longer cellular battery life and longer life time of BTS power amplifiers

HANDOVER

Handover happens whenever a phone needs to be handed to a different whilst the person goes between tissues in one cell. In a conventional "difficult" handover, the bond to the present cell is damaged, after which the bond towards the cell is created. This really is referred to as a "split-before-create" handover. Because all tissues in CDMA make use of the same consistency, it's feasible before departing the present cell to help make the link with the cell. This really is referred to as a "create-before-split" or "gentle" handover. Less energy, which decreases disturbance and raises capability is required by gentle handovers. Cellular could not be unconnected to more that two BTS the handover. "Smoother" handover is just an unique situation of smooth handover where radio stations links that eliminated and are included fit in with the exact same Node N.

CDMA handover

MULTIPATH AND RAKE RECEIVERS

One of CDMA systems' primary benefits may be of utilizing indicators that get to the devices with various time delays the capability. This trend is known as multipath. TDMA and fDMA, that are narrow-band methods, can't discriminate between the arrivals, and resort to equalization to offset the adverse effects of multipath. Due to rake receivers and its broad bandwidth, CDMA employs the multipath includes them to create a level tougher sign in the receivers and signals. Rake receivers are used by cDMA subscriber devices. This really is basically some many devices. Among the devices (fingers) continuously looks for various multipaths and feeds the info towards the additional three fingers. Each finger demodulates the sign equivalent to a powerful multipath. The outcomes are subsequently mixed together to help make the sign tougher.

Distinction between TDMA vs CDMA.

TDMA is "Time Division Multiple Entry", while CDMA is "Signal Section Multiple Entry". Both systems accomplish greater usage of radio stations spectrum's same objective using various techniques, but although by permitting multiple customers to talk about exactly the same actual route and that's the three of the four phrases in each phrase are similar. Equally permit several individual without causing disturbance to handle a discussion on a single consistency.

Both systems vary in the manner by which the most popular source is shared by customers. Into consecutive time-slices the funnel is chopped-up in TDMA. Every user's information is placed on the funnel in a round robin style. The truth is, just one person really employs the funnel at any point-of period, but it is used by him just for quick breaks. Then he provides the funnel to get a short-duration to permit another customers to possess their change up. This really is much like how numerous programs operates simultaneously.

CDMA about the hand enables everybody to transfer in the same period. With traditional ways of modulation methods it'd hav been not feasible. Why is CDMA to permit all customers to transfer simultaneously is just a special-type of electronic modulation named "Spread Spectrum". Within this modulation method personis flow splattered and of pieces is obtained them across an extremely broad funnel in a pseudo- fashion. The "pseudo" component is essential below as in order the randomization should be undone in the recipient finish to gather the pieces together.

For instance think about a space saturated in each pair attempting to bring on one, and partners -onone discussions. In TDMA their change is taken by each pair for speaking plus they maintain by talking just one phrase at the same time their converts brief. No body needs to be worried about being noticed within the history noise as there's usually more one individual talking within the space at any point-of period. In CDMA suppose each pair discussions simultaneously, however various languages are all used by them. The back ground noise does not trigger any actual issue as none of the fans comprehend any language apart from that of the person to whom they're currently hearing.

Voice Coding

At this time two clearly unique problems active in the indication of digital sound are confused by lots of people. The very first is THE WAY IN WHICH where bits' flow is shipped towards the different in one stop. This area of the "air-interface" is why is one engineering not the same as another. The second reason is the pressure protocol used-to press the sound into as little a flow of pieces as you can.

This element is famous in the "Speech Coder" , or Vocoder for brief. Another phrase popular is CODEC, which is really a comparable term to device. It includes the conditions "COder" and "DECoder". There's no principle stating this 1 indication technique must make use of a particular CODEC though each engineering has selected their own CODECs. Individuals frequently lump the indication technique of a technology using its CODEC as if these were simple organizations.

Speech coding strategies vary somewhat to the issue within their approach. As a result of this kinds of individual speech are more effective with a few CODECs than they are doing with others. The purpose to consider is the fact that all Computers CODECs are compromises of some kind. One can't anticipate any simple bargain to deal with each one of these well because individual sounds have this type of wonderful selection of message and tonal level. This failure to cope in the same-level with all kinds of speech does direct many people to select one technology over another.

All the Computers systems attempt to reduce battery consumption by maintaining the indication of information that is needless to some minimum. The telephone chooses whether you're currently talking, or when the audio it learns is simply background sound. When the telephone decides that there's no smart information to transfer it blanks the audio also it decreases the transmitter work period (in the event of TDMA) or even the quantity of given bits (in the event of CDMA). Once the sound is blanked your owner might instantly end up hearing "dead-air", which could cause them to consider the phone call has fallen.

To prevent this issue that is mental several providers place what's referred to as "Comfort Sound" throughout the intervals that are blanked. Comfort Sound is synthesized noise that attempts to imitate framework and the amount of the actual background sound. This background sound that is phony guarantees the owner the link is properly and living.

Nevertheless, in newer CODECs for example EVRC (employed solely on CDMA techniques) the backdrop sound is usually suppressed whilst the consumer is speaking. This bit of miracle makes it seem as if the mobile phone person isn't in a loud atmosphere whatsoever. Under these problems, Convenience Sound is neither required, or desired.

DS-CDMA-LAUNCH

Although multiple entry disturbance (MAI) by different customers hasbeen thought to be the capability-limiting element in immediate series signal-section multiple-entry (DS-CDMA)-based mobile transmission methods, multiuser methods have mostly relieved the issue once the sound procedure is additive Gaussian. Using multiuser detectors' availability, improper or incorrect sound modelling assumptions appear to have grown to be the problem again.

While multiuser detection has significantly to provide within the cellular- to-base station uplink, it generally does not at the moment be seemingly possible for that downlink because of the difficulty required and also the

Lack against surrounding cell disturbance of opposition. Furthermore, the several multiuser plans for that downlink need the data of spreading rules, that will be impossible within the military atmosphere, for example. Improved simple-person devices designed with flexible filter banks provide encouraging efficiency with affordable difficulty, particularly

In channels that are slowly. Hence, simple-person detectors' efficiency continues to be within the existence of low- noise, especially of curiosity. In interior cellular radio surroundings and both metropolitan outside, electromagnetic disturbance produced by man made resources for example power-lines or producers causes the sound to become of low-Gaussian character. Linear devices deem extremely unbelievable big sound magnitudes, and therefore efficiency damage is not inexperienced. It's thus appealing to construct methods that may preserve performance that is respected under an extensive course of sound distributions, instead of purely perfecting for that Gaussian prediction that is unlikely. Such may be the objective of strong recognition and evaluation concept, which seeks to create methods which are suboptimal under minimal channel problems (e.g., Gaussian station) but don't encounter catastrophy once the sound submission isn't minimal (e.g., unlike linear strategies). Observe that suboptimality below relates

To excellent performance that's not somewhat better than that of the minimal-optimum sensor/estimator.

The immediate series code-division multiple-access (DS-CDMA) method continues to be positively regarded for software in electronic cellular mobile systems because of its potential to supply greater program capability over traditional multiple-access methods. Unlike FDMA capabilities that are mainly restricted to the bandwidth, its disturbance level principally restricts the capability of the CDMA method. Any decrease in disturbance creates a linear and direct escalation in program capability. Multiple-access disturbance (MAI) due to non zero cross-relationship between various spreading sequences may be the main kind of disturbance restricting the CDMA system capability. Work hasbeen completed to evaluate and assess, and also to define MAI the CDMA system efficiency within the existence of MAI. Because the mix-relationship attributes of spreading rules on most models are possibly very hard to calculate when various attacks aren't synchronized, a series design or too complicated to investigate. In the event of running increases that are reasonable to big distribution with difference that is variable is a great approximation for that MAI submission. Among the methods to decrease MAI would be to utilize orthogonal spreading sequences, and attempt to connect the attacks in the processor degree (quasi-synchronization). Nevertheless, this really is usually hard to attain in multipoint-to-stage methods, like the opposite link (mobile-to-foundation) of the cellular program, as a result of insufficient synchronization of the different mobile devices, and also the variable transmission delays. Within this document, a multiple-provider DS-CDMA (MCDS-CDMA) plan is utilized reduce MAI, and therefore to help the synchronization procedure.

SYSTEM MODEL

There is of the MS-DS-CDMA method for that kth person of the CDMA method a type proven within the number 1.

TRANMSITTER DESIGN

In the transmitter the user‘s data-stream dk(t) is divided in to MICHAEL interleaved sub-streams and spread with a spreading series ck(t) to some portion 1/MICHAEL of the whole transmission bandwidth N. The resulting processor sequences are subsequently used-to regulate M provider. The company wavelengths ?m,m=1,2,...M are equally spread from the processor price so they are mutually orthogonal over one-channel image period T. Let R function as the info price and Rc function as the provider handle signal price then your funnel image period is

BER PERFORMANCE:

MC-DS-CDMA system efficiency calculated by bit error rate through simulation and evaluation.

Research:

The BER is analysed on the basis of the following:

  • Ortoganal are utilized.
  • ?k,k=1…K are independent of arbitrary factors distributd in (-?D,?D) WHEREVER ?D=?D+?D.Given WATTS and ?D,M is selected to ensure that ?D<=TC.
  • It's thought the diminishing guidelines of the person that was specified.

It's completely believed so that ideal delicate decision decoding and the coherent recognition might be completed in the recipient to help make the issue analytically tractable. The amplitudes Rayleigh random factors with second times that are equivalent. The design is

MATLAB LAUNCH:

Matlab is just a professional "Matrix Lab" bundle which works being an active development environment. It it is readily available for Computeris and Macintoshes and is a pillar of the Arithmetic Division application selection and could be located on the CIRCA VAXes. Matlab is well-adapted to statistical tests because the fundamental calculations for the builtin capabilities of Matlab and provided MFiles derive from EISPACK and the conventional libraries LINPACK.

Software documents and Matlab system also have filenames ending with ".m"; because nearly every information item is thought to become an assortment the development language is extremely simple. Visual result can be obtained to complement statistical results.

IMREAD Study image from graphics file.

A = IMREAD(FILENAME,FMT) says a grayscale or shade picture in the document

Given from the string FILENAME. When the document isn't in a directory about the MATLAB route, or in the present listing, identify the entire pathname. The written text line FMT identifies the file's structure by its file extension that is regular. For Design Interchange Format documents, identify 'gif' for instance. To determine a summary of platforms that are recognized, using their document extensions, make use of the IMFORMATS purpose. It searches for a document called FILENAME.FMT if IMREAD can't look for a document called FILENAME.

IMFINFO details about graphics file.

DATA = IMFINFO(FILENAME,FMT) returns a framework whose areas include details about a picture in a design file. FILENAME is just a chain that identifies the artwork file's title, and FMT is just a chain that identifies the file's structure. The document should be in a listing about the MATLAB course or in the present listing. It searches for a document called FILENAME.FMT if IMFINFO can't look for a document called FILENAME.

IMWRITE Create image to design file.

IMWRITE(A,FILENAME,FMT) creates the picture A towards the document given by

FILENAME within the structure given by FMT.

An is definitely an M-by-D (grayscale image) or M-by-N-by-3 (color image) variety. A CAn't be an array that is empty. When the structure given is TIFF, IMWRITE may also take an M-by-N-by-4 range comprising color information that employs the CMYK color area.

FILENAME is just a chain that identifies the file's title.

SIZE Dimension of variety.

D = DIMENSION(X), for M-by-D matrix X, returns both-component line vector D = [M,D] comprising the amount of lines and posts within the matrix. For N D arrays, DIMENSION(X) returns a-1-by-D vector of measurement measures. Looking singleton measurements are overlooked.

[M,N] = SIZE(X) for matrix X, returns the amount of lines and posts in

X as output parameters that are individual.

IMSHOW Show picture in Handle Design number.

IMSHOW (I) shows the grayscale picture I. IMSHOW(I,[LOW-HIGH]) shows the grayscale picture I, indicating the show array for I in [LOW-HIGH]. The worthiness REDUCED (and any value-less than REDUCED) shows as dark, the worthiness LARGE (and any worth more than LARGE) shows as white. Ideals between are shown as advanced shades-of grey, utilizing gray levels' standard quantity. If you are using a clear matrix ([]) for [LOW-HIGH], IMSHOW employs [minute(I(:)) max(I(:))]; that's, the minimal price in I is shown as dark, and also the optimum price is shown as white.

SUGGEST Average.

For vectors, IMPLY(X) may be the weather in X's mean price. For matrices, IMPLY(X) is just a line vector comprising every column's mean price. For N D arrays, IMPLY(X) may be the mean price of the weather across the first low-singleton measurement of X.

MINUTE Smallest element.

For vectors, MINUTE(X) may be the smallest aspect in X. For matrices, MINUTE(X) is just a line vector comprising the minimal component from each line. For N D arrays, MINUTE(X) works across the first low-singleton measurement.

MAX Biggest element.

For vectors, MAX(X) may be the biggest aspect in X. For matrices, MAX(X) is just a line vector comprising the most component from each line. For N D arrays, MAX(X) works across the first low-singleton measurement.

Precision to double.

DUAL(X) returns the double precision value for X. INCREASE doesn't have impact if X has already been a dual precision variety.

If the phrase is not already precision dUAL is known as for the words SET FOR, IF. DUAL ought to be bombarded for several items where it seems sensible to transform it.

RAND Evenly distributed pseudo- numbers.

R = RAND(D) returns a D-by-D matrix comprising pseudo-arbitrary values driven from the standard submission about the unit period.

RAND(M,D) or RAND([M,D]) returns an M-by-D matrix.

RAND(M,D,G,...) or RAND([M,D,G,...]) returns an M-by-N-by-P-by-... Selection.

A scalar is returned by RAND without any arguments.

RAND(DIMENSION(A)) returns an assortment exactly the same size Like A.

APPLICATIONS

1. Comparison of performance sensitivities towards the amount of customers between MC's variance -DS- CDMA -DS-CDMA.

clear all;

Near all;

clc;

%%

no_of_user=40;

no_of_sub =8;

N=10^3;

%%

length_mess=no_of_user*N;

walsh=hadamard(no_of_sub);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

finish

Finish

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

dataku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(mess);

eleku=randperm(len);

intr_lveku=intrlv(mess,eleku)

datamod = 2*intr_lveku-1;

user_data_modku=datamod';

locx=locy+1

locy=locx+(N-1)

finish

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

finish

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

finish

%%

for ku=2:no_of_user

N1=N*(n/k);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

tx_data_final=sp_dataku-1+sp_dataku;

x11=tx_data_final(:);

x12=reshape(x11,1,length(x11));

i=1:length(x12);

%%

delay1=1;

for i=delay1+1:length(x12)

x13(i)=tx_data_final(i-delay1);

finish

delay2=2;

for i=delay2+1:length(x12)

x14(i)=tx_data_final(i-delay2);

finish

delay3=3;

for i=delay3+1:length(x12)

x15(i)=tx_data_final(i-delay3);

finish

x1=reshape(x13,(no_of_sub+3),length(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),length(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),length(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,length(data_noise1));

finish

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0:2:8];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),length(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku)

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= size(find([dataku- out_data]),2);

bit_error_rate(i)= errors_user1/N;

finish

%% 70

no_of_user=70;

no_of_sub =8;

N=10^3;

%%

length_mess=no_of_user*N;

walsh=hadamard(no_of_sub);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

finish

Finish

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

dataku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(mess);

eleku=randperm(len);

intr_lveku=intrlv(mess,eleku)

datamod = 2*intr_lveku-1;

user_data_modku=datamod';

locx=locy+1

locy=locx+(N-1)

finish

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

finish

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

finish

%%

for ku=2:no_of_user

N1=N*(n/k);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

tx_data_final=sp_dataku-1+sp_dataku;

x11=tx_data_final(:);

x12=reshape(x11,1,length(x11));

i=1:length(x12);

%%

delay1=1;

for i=delay1+1:length(x12)

x13(i)=tx_data_final(i-delay1);

finish

delay2=2;

for i=delay2+1:length(x12)

x14(i)=tx_data_final(i-delay2);

finish

delay3=3;

for i=delay3+1:length(x12)

x15(i)=tx_data_final(i-delay3);

finish

x1=reshape(x13,(no_of_sub+3),length(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),length(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),length(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,length(data_noise1));

finish

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0:2:8];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),length(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku)

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= size(find([dataku- out_data]),2);

bit_error_rate1(i)= errors_user1/N;

finish

%% SC

n=6;k=4;

N1 = 10^4;

no_of_user=40;

for ku=1:no_of_user

ip1ku = rand(1,N1)>0.5;

finish

ip=cell2mat(ip1);

ip2=encode(double(ip),n,k,'cyclic');

loc=randperm(length(ip2));

ip3=intrlv(ip2,loc);

s = 2*ip3-1;

N=length(s);

Eb_N0_dB = [0:2:8];

no_of_sub=6;

for jj = 1:duration(no_of_sub)

for two = 1:length(Eb_N0_dB)

n1 = 1/sqrt(2)*[randn(no_of_sub(jj),N) + j*randn(no_of_sub(jj),N)];

h = 1/sqrt(2)*[randn(no_of_sub(jj),N) + j*randn(no_of_sub(jj),N)];

sD = kron(types(no_of_sub(jj),1),s);

B = h.*sD + 10^(-Eb_N0_dB(ii)/20)*n1;

yHat = y.*exp(-j*angle(h));

yHat = sum(yHat,1);

ipHat = real(yHat)>0;

ipde1=deintrlv(uint8(ipHat),loc);

ipde3=decode((ipde1),n,k,'cyclic');

nErr(jj,ii) = size(find([ip- ipde3]),2);

finish

Finish

bit_error_rate2 = nErr/N;

%% 70

n=6;k=4;

N1 = 10^4;

no_of_user=70;

for ku=1:no_of_user

ip1ku = rand(1,N1)>0.5;

finish

ip=cell2mat(ip1);

ip2=encode(double(ip),n,k,'cyclic');

loc=randperm(length(ip2));

ip3=intrlv(ip2,loc);

s = 2*ip3-1;

N=length(s);

Eb_N0_dB = [0:2:8];

no_of_sub=6;

for jj = 1:duration(no_of_sub)

for two = 1:length(Eb_N0_dB)

n1 = 1/sqrt(2)*[randn(no_of_sub(jj),N) + j*randn(no_of_sub(jj),N)];

h = 1/sqrt(2)*[randn(no_of_sub(jj),N) + j*randn(no_of_sub(jj),N)];

sD = kron(types(no_of_sub(jj),1),s);

B = h.*sD + 10^(-Eb_N0_dB(ii)/20)*n1;

yHat = y.*exp(-j*angle(h));

yHat = sum(yHat,1);

ipHat = real(yHat)>0;

ipde1=deintrlv(double(ipHat),loc);

ipde3=decode(ipde1,n,k,'cyclic');

nErr(jj,ii) = size(find([ip- ipde3]),2);

finish

Finish

bit_error_rate3 = nErr/N;

figure,semilogy(snr,bit_error_rate,'r*:',snr,bit_error_rate1,'g>:',snr,bit_error_rate2,'ys-',snr,bit_error_rate3,'kd-','linewidth',2);

legend('40 person MC-CDMA','70 person MC-CDMA','40 person SC CDMA','70 person SC CDMA');

title('performance');

xlabel('SNR value');

ylabel('bit error rate');

grid on;

2. Impact of error handle code on MC-DS- CDMA -DS-CDMA devices.

clear all;

Near all;

clc;

%%

no_of_user=70;

no_of_sub =8;

N=10^3;

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

finish

Finish

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

dataku= original_message(locx:locy);

datamod = 2*dataku-1;

user_data_modku=datamod';

locx=locy+1

locy=locx+(N-1)

finish

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

finish

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

finish

%%

for ku=2:no_of_user

N1=N;

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

tx_data_final=sp_dataku-1+sp_dataku;

x11=tx_data_final(:);

x12=reshape(x11,1,length(x11));

i=1:length(x12);

%%

delay1=1;

for i=delay1+1:length(x12)

x13(i)=tx_data_final(i-delay1);

finish

delay2=2;

for i=delay2+1:length(x12)

x14(i)=tx_data_final(i-delay2);

finish

delay3=3;

for i=delay3+1:length(x12)

x15(i)=tx_data_final(i-delay3);

finish

x1=reshape(x13,(no_of_sub+3),length(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),length(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),length(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,length(data_noise1));

finish

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0:2:8];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),length(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

out_data=recdata12;

errors_user1= size(find([dataku- out_data]),2);

bit_error_rate(i)= errors_user1/N;

finish

%% 70

no_of_user=70;

no_of_sub =8;

N=10^3;

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

finish

Finish

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

dataku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(mess);

eleku=randperm(len);

intr_lveku=intrlv(mess,eleku)

datamod = 2*intr_lveku-1;

user_data_modku=datamod';

locx=locy+1

locy=locx+(N-1)

finish

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

finish

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

finish

%%

for ku=2:no_of_user

N1=N*(n/k);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

tx_data_final=sp_dataku-1+sp_dataku;

x11=tx_data_final(:);

x12=reshape(x11,1,length(x11));

i=1:length(x12);

%%

delay1=1;

for i=delay1+1:length(x12)

x13(i)=tx_data_final(i-delay1);

finish

delay2=2;

for i=delay2+1:length(x12)

x14(i)=tx_data_final(i-delay2);

finish

delay3=3;

for i=delay3+1:length(x12)

x15(i)=tx_data_final(i-delay3);

finish

x1=reshape(x13,(no_of_sub+3),length(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),length(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),length(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,length(data_noise1));

finish

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0:2:8];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)*i/20))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),length(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku)

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= size(find([dataku- out_data]),2);

bit_error_rate1(i)= errors_user1/(N*i);

finish

%% SC

n=6;k=4;

N1 = 10^4;

no_of_user=70;

for ku=1:no_of_user

ip1ku = rand(1,N1)>0.5;

finish

ip=cell2mat(ip1);

s = 2*ip-1;

N=length(s);

Eb_N0_dB = [0:2:8];

no_of_sub=6;

for jj = 1:duration(no_of_sub)

for two = 1:duration(Eb_N0_dB)

D = 1/sqrt(2)*[randn(no_of_sub(jj),N) + j*randn(no_of_sub(jj),N)];

h = 1/sqrt(2)*[randn(no_of_sub(jj),N) + j*randn(no_of_sub(jj),N)];

sD = kron(types(no_of_sub(jj),1),s);

B = h.*sD + 10^(-Eb_N0_dB(ii)/20)*n;

yHat = y.*exp(-j*angle(h));

yHat = sum(yHat,1);

ipHat = real(yHat)>0;

nErr(jj,ii) = size(find([ip- ipHat]),2);

finish

Finish

bit_error_rate2 = nErr/N;

%% 70

nn=6;kk=4;

N1 = 10^4;

no_of_user=70;

for ku=1:no_of_user

ip1ku = randint(1,N1,2);

finish

ip=cell2mat(ip1);

ip2=encode(ip,nn,kk,'cyclic');

loc=randperm(length(ip2));

ip3=intrlv(ip2,loc);

s = 2*ip3-1;

N=length(s);

Eb_N0_dB = [0:2:8];

no_of_sub=6;

for jj = 1:duration(no_of_sub)

for two = 1:duration(Eb_N0_dB)

D = 1/sqrt(2)*[randn(no_of_sub(jj),N) + j*randn(no_of_sub(jj),N)];

h = 1/sqrt(2)*[randn(no_of_sub(jj),N) + j*randn(no_of_sub(jj),N)];

sD = kron(types(no_of_sub(jj),1),s);

B = h.*sD + 10^(-Eb_N0_dB(ii)/20)*n;

yHat = y.*exp(-j*angle(h));

yHat = sum(yHat,1);

ipHat = real(yHat)>0;

ipde1=deintrlv(uint8(ipHat),loc);

ipde3=decode((ipde1),nn,kk,'cyclic');

nErr(jj,ii) = size(find([ip- ipde3]),2);

finish

Finish

bit_error_rate3 = nErr/N;

figure,semilogy(snr,bit_error_rate,'r*:',snr,bit_error_rate1,'k-',snr,bit_error_rate3,'ms:','linewidth',2);

legend('70 person MC-CDMA without code','70 person MC-CDMA with','70 person SC CDMA without signal','70 person SC CDMA with code');

title('performance');

xlabel('SNR value');

ylabel('bit error rate');

grid on;

3. MC-DS-CDMA efficiency utilizing heart forms that are various.

%% 70

no_of_user=70;

no_of_sub =8;

N=10^3;

fs = N/2;

t = -5:1/fs:5;

pulse_rectvalue = rectpuls(t,20e-6);

pulse_value=pulse_rectvalue(1:N);

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

finish

Finish

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

dataku= original_message(locx:locy);

msg=double(xor(dataku,pulse_value));

mess= encode((msg),n,k,'cyclic'); % Signal is a binary line.

len=length(mess);

eleku=randperm(len);

intr_lveku=intrlv(mess,eleku)

datamod = 2*intr_lveku-1;

user_data_modku=datamod';

locx=locy+1

locy=locx+(N-1)

finish

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

finish

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

finish

%%

for ku=2:no_of_user

N1=N*(n/k);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

tx_data_final=sp_dataku-1+sp_dataku;

x11=tx_data_final(:);

x12=reshape(x11,1,length(x11));

i=1:length(x12);

%%

delay1=1;

for i=delay1+1:length(x12)

x13(i)=tx_data_final(i-delay1);

finish

delay2=2;

for i=delay2+1:length(x12)

x14(i)=tx_data_final(i-delay2);

finish

delay3=3;

for i=delay3+1:length(x12)

x15(i)=tx_data_final(i-delay3);

finish

x1=reshape(x13,(no_of_sub+3),length(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),length(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),length(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,length(data_noise1));

finish

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0:1:18];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),length(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku)

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= size(find([dataku- out_data]),2);

bit_error_rate1(i)= errors_user1/N;

finish

%% sinc

no_of_user=70;

no_of_sub =8;

N=10^3;

Nk=N;

fs = Nk/2;

t = linspace(-5,5,Nk);

pulse_sin =sinc(t)>0.05;

pulse_value1=pulse_sin(1:Nk);

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

finish

Finish

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

dataku= original_message(locx:locy);

msg=double(xor(dataku,pulse_value));

mess= encode((msg),n,k,'cyclic'); % Signal is a binary line.

len=length(mess);

eleku=randperm(len);

intr_lveku=intrlv(mess,eleku)

datamod = (2*intr_lveku-1);

user_data_modku=datamod';

locx=locy+1

locy=locx+(N-1)

finish

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

finish

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

finish

%%

for ku=2:no_of_user

N1=N*(n/k);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

tx_data_final=sp_dataku-1+sp_dataku;

x11=tx_data_final(:);

x12=reshape(x11,1,length(x11));

i=1:length(x12);

%%

delay1=1;

for i=delay1+1:length(x12)

x13(i)=tx_data_final(i-delay1);

finish

delay2=2;

for i=delay2+1:length(x12)

x14(i)=tx_data_final(i-delay2);

finish

delay3=3;

for i=delay3+1:length(x12)

x15(i)=tx_data_final(i-delay3);

finish

x1=reshape(x13,(no_of_sub+3),length(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),length(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),length(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,length(data_noise1));

finish

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0:1:18];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-(snr(i))/10))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),length(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku)

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= size(find([dataku- out_data]),2);

bit_error_rate2(i)= errors_user1/(N);

finish

figure,semilogy(snr,bit_error_rate1,'r*:',snr,bit_error_rate2,'ks-','linewidth',2);

title('performance');

xlabel('SNR value');

ylabel('bit error rate');

grid on;

4. MC-DS-CDMA system efficiency under various amplitude correlation assumptions that are diminishing.

clear all;

Near all;

clc;

%% 70

no_of_user=70;

no_of_sub =8;

N=10^3;

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

finish

Finish

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

dataku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(mess);

eleku=randperm(len);

intr_lveku=intrlv(mess,eleku)

datamod = 2*intr_lveku-1;

user_data_modku=datamod';

locx=locy+1

locy=locx+(N-1)

finish

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

finish

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

finish

%%

for ku=2:no_of_user

N1=N*(n/k);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

tx_data_final=sp_dataku-1+sp_dataku;

x11=tx_data_final(:);

x12=reshape(x11,1,length(x11));

i=1:length(x12);

%%

delay1=1;

for i=delay1+1:length(x12)

x13(i)=tx_data_final(i-delay1);

finish

delay2=2;

for i=delay2+1:length(x12)

x14(i)=tx_data_final(i-delay2);

finish

delay3=3;

for i=delay3+1:length(x12)

x15(i)=tx_data_final(i-delay3);

finish

x1=reshape(x13,(no_of_sub+3),length(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),length(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),length(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,length(data_noise1));

finish

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0:2:8];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),length(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku)

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= size(find([dataku- out_data]),2);

bit_error_rate1(i)= errors_user1/N;

finish

%%

%% 70

no_of_user=70;

no_of_sub =8;

N=10^3;

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

finish

Finish

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

dataku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(mess);

eleku=randperm(len);

intr_lveku=intrlv(mess,eleku)

datamod = 2*intr_lveku-1;

user_data_modku=datamod';

locx=locy+1

locy=locx+(N-1)

finish

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

finish

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

finish

%%

for ku=2:no_of_user

N1=N*(n/k);

Taps=4;

p1=0.5/1.6;

p2=0.9/1.5;

p3=0.7/1.3;

p4=0.2/0.4;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

tx_data_final=sp_dataku-1+sp_dataku;

x11=tx_data_final(:);

x12=reshape(x11,1,length(x11));

i=1:length(x12);

%%

delay1=1;

for i=delay1+1:length(x12)

x13(i)=tx_data_final(i-delay1);

finish

delay2=2;

for i=delay2+1:length(x12)

x14(i)=tx_data_final(i-delay2);

finish

delay3=3;

for i=delay3+1:length(x12)

x15(i)=tx_data_final(i-delay3);

finish

x1=reshape(x13,(no_of_sub+3),length(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),length(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),length(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,length(data_noise1));

finish

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0:2:8];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),length(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku)

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= size(find([dataku- out_data]),2);

bit_error_rate2(i)= errors_user1/N;

finish

figure,semilogy(snr,bit_error_rate1,'k-','linewidth',2);

legend('ucorrelation ','correlation');

title('performance');

xlabel('SNR value');

ylabel('bit error rate');

grid on;

5. MC-DS-CDMA system efficiency versus the amount of subchannels.

clear all

clc

All

no_of_user=70;

sub_ch=[4 8 16 32];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub);

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(chaos);

eleku=randperm(len);

intr_lveku=intrlv(clutter,eleku);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1;

locy=locx+(N 1);

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N*(d/e);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=4;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=4;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=4;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [10];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

=y that is data_received;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku);

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= dimension(find([informationku- out_data]),2);

Errors_user1 /D;

end

bit_error_rate1(ksub)=bit_errorx1;

end

X15

%%

no_of_user=70;

sub_ch=[4 8 16 32];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub);

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(chaos);

eleku=randperm(len);

intr_lveku=intrlv(clutter,eleku);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1;

locy=locx+(N 1);

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N*(d/e);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=2;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=2;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=2;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [10];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/15))*noise; %Addition of Sound

=y that is data_received;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku);

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= dimension(find([informationku- out_data]),2);

Errors_user1 /D;

end

bit_error_rate2(ksub)=bit_errorx1;

end

X15

%%

no_of_user=70;

sub_ch=[4 8 16 32];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub);

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(chaos);

eleku=randperm(len);

intr_lveku=intrlv(clutter,eleku);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1;

locy=locx+(N 1);

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N*(d/e);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=1;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=1;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=1;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [10];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/10))*noise; %Addition of Sound

=y that is data_received;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku);

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= dimension(find([informationku- out_data]),2);

Errors_user1 /D;

end

bit_error_rate3(ksub)=bit_errorx1;

end

%% plot

Number,semilogy(sub_ch,bit_error_rate1,'e-',sub_ch,bit_error_rate3,'rs:','linewidth',2);

axis([4 32 10^-3 10^0]);

legend('delay case1 ','delay case2','delay case3');

Name('efficiency');

xlabel('SNR value');

ylabel('bit error rate');

grid on;

6. MC-DS-CDMA system efficiency versus subchannels' number with interleaving for various delay spreads and without interleaving

clear all;

close all;

clc;

%%

no_of_user=50;

sub_ch=[4-8 16];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub);

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1

locy=locx+(N 1)

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N;

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=1;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=2;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=3;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

h data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

=y that is data_received;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

out_data=recdata12;

errors_user1= dimension(find([informationku- out_data]),2);

bit_errorx(i)= errors_user1/D;

end

bit_error_rate(ksub)=bit_errorx;

end

%%

X15

no_of_user=50;

sub_ch=[4-8 16];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub)

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(chaos);

eleku=randperm(len);

intr_lveku=intrlv(clutter,eleku);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1;

locy=locx+(N 1);

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N*(d/e);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=1;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=2;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=3;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

=y that is data_received;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku);

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= dimension(find([informationku- out_data]),2);

Errors_user1 /D;

end

bit_error_rate1(ksub)=bit_errorx1;

end

Number,semilogy(sub_ch,bit_error_rate,'e-','linewidth',2);

axis([4 16 10^-2 10^0]);

Tale('without inter','with inter');

Name('efficiency');

xlabel('SNR value');

ylabel('bit error rate');

grid on;

clear all;

close all;

clc;

%%

no_of_user=50;

sub_ch=[4-8 16];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub);

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1

locy=locx+(N 1)

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N;

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=8;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=8;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=8;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

=y that is data_received;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

out_data=recdata12;

errors_user1= dimension(find([informationku- out_data]),2);

bit_errorx(i)= errors_user1/D;

end

bit_error_rate(ksub)=bit_errorx;

end

%%

X15

no_of_user=50;

sub_ch=[4-8 16];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub)

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(chaos);

eleku=randperm(len);

intr_lveku=intrlv(clutter,eleku);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1;

locy=locx+(N 1);

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N*(d/e);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=8;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=8;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=8;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(20)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

=y that is data_received;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku);

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= dimension(find([informationku- out_data]),2);

Errors_user1 /D;

end

bit_error_rate1(ksub)=bit_errorx1;

end

Number,semilogy(sub_ch,bit_error_rate,'e-','linewidth',2);

axis([4 16 10^-1 10^0]);

Tale('without inter','with inter');

Name('efficiency');

xlabel('sub route');

ylabel('bit error rate');

grid on;

clear all;

close all;

clc;

%%

no_of_user=50;

sub_ch=[4-8 16];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub);

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1

locy=locx+(N 1)

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N;

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=3;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=3;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=3;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

data_received =y;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

out_data=recdata12;

errors_user1= dimension(find([informationku- out_data]),2);

bit_errorx(i)= errors_user1/D;

end

bit_error_rate(ksub)=bit_errorx;

end

%%

X15

no_of_user=50;

sub_ch=[4-8 16];

N=10^3;

for ksub=1:duration(sub_ch)

no_of_sub =sub_ch(ksub)

%%

length_mess=no_of_user*N;

walsh1=hadamard(no_of_sub);

walsh=REEDMULER(walsh1);

kux=1;

for ku=1:no_of_user

codeku=walsh(kux,:);

kux=kux+1;

if(kux==no_of_sub)

kux=1;

end

end

D = 6; k communication size and % Collection codeword size % to get a [6,4] code.

%%

original_message=randint(1,length_mess,2);

locx=1;

locy=N;

for ku=1:no_of_user

Informationku= original_message(locx:locy);

msg=dataku;

mess= encode(msg,n,k,'cyclic'); % Signal is a binary line.

len=length(chaos);

eleku=randperm(len);

intr_lveku=intrlv(clutter,eleku);

Datamod = ku-1;

User_data_mod ku=datamod';

locx=locy+1;

locy=locx+(N 1);

end

%%

for ku=1:no_of_user

data_user11=user_data_modku;

spdata1_user1=data_user11*(codeku);

spdata12=(spdata1_user1)';

ifftdata_user1=ifft(spdata12);

ifftdata12=ifftdata_user1';

y1=[ifftdata12(:,[(no_of_sub-2):no_of_sub]) ifftdata12];

transdata1=y1';

tx_user=transdata1;

sp_dataku=tx_user;

end

%%

tx_data_final=zeros(size(sp_data1));

for ku=1:no_of_user

tx_data_final=tx_data_final+sp_dataku;

end

%%

for ku=2:no_of_user

N1=N*(d/e);

Taps=4;

p1=0.5/2.3;

p2=0.9/2.3;

p3=0.7/2.3;

p4=0.2/2.3;

gain1=sqrt(p1/2)*[randn(1,N1) + j*randn(1,N1)];

gain2=sqrt(p2/2)*[randn(1,N1) + j*randn(1,N1)];

gain3=sqrt(p3/2)*[randn(1,N1) + j*randn(1,N1)];

gain4=sqrt(p4/2)*[randn(1,N1) + j*randn(1,N1)];

Tx_data_final=sp_dataku-INCH +sp_data that is ku;

x11=tx_data_final(:);

x12=reshape(x11,1,duration(x11));

i=1:duration(x12);

%%

delay1=3;

for i=delay1+1:duration(x12)

x13(i)=tx_data_final(i-delay1);

end

delay2=3;

for i=delay2+1:duration(x12)

x14(i)=tx_data_final(i-delay2);

end

delay3=3;

for i=delay3+1:duration(x12)

x15(i)=tx_data_final(i-delay3);

end

x1=reshape(x13,(no_of_sub+3),duration(x13)/(no_of_sub+3));

x2=reshape(x14,(no_of_sub+3),duration(x14)/(no_of_sub+3));

x3=reshape(x15,(no_of_sub+3),duration(x15)/(no_of_sub+3));

ch1=repmat(gain1,(no_of_sub+3),1);

ch2=repmat(gain2,(no_of_sub+3),1);

ch3=repmat(gain3,(no_of_sub+3),1);

ch4=repmat(gain4,(no_of_sub+3),1);

data_channel=(tx_data_final).*ch1+x1.*ch2+x2.*ch3+x3.*ch4;

data_noise1=data_channel(:);

data_noise2=reshape(data_noise1,1,duration(data_noise1));

end

%%

Sound = 1/sqrt(2)*[randn(1,length(data_noise2)) + j*randn(1,length(data_noise2))];

snr = [0];

for i = 1:duration(snr)

B = data_noise2 + (sqrt(1)*10^(-snr(i)/20))*noise; %Addition of Sound

=y that is data_received;

rx1=reshape(data_received,(no_of_sub+3),duration(data_received)/(no_of_sub+3));

rx12=rx1';

rx13 = rx12(:,[(4:(no_of_sub+3))]);

rx14=rx13';

fft_data_received =fft(rx14);

channel_response=fft([gain1;gain2;gain3;gain4],no_of_sub);

data_equilized=fft_data_received.*conj(channel_response);

ku=no_of_user;

recdata11=(data_equilized'*(codeku)')';

recdata12=real(recdata11)>0;

mess1=deintrlv(uint8(recdata12),eleku);

out_data= decode(double(mess1),n,k,'cyclic'); % Signal is a binary line.

errors_user1= dimension(find([informationku- out_data]),2);

Errors_user1 /D;

end

bit_error_rate1(ksub)=bit_errorx1;

end

Number,semilogy(sub_ch,bit_error_rate,'e-','linewidth',2);

axis([4 16 10^-1 10^0]);

Tale('without inter','with inter');

Name('efficiency');

xlabel('SNR value');

ylabel('bit error rate');

grid on;