Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1 Task Write a program which allows the user to pick up electrical signals and t

ID: 3842940 • Letter: 1

Question

1 Task

Write a program which allows the user to pick up electrical signals and to output them as required for a given electric circuit at different measuring points. The central element is variable resistors (potentiometers) whose electrical conductivity can be adjusted continuously between 0 and Pmax.

The circuit itself is to be implemented as fixed. The entire circuit has a single V0 volt voltage source and a switching circuit with exactly two parallel basic switching paths as a structure. These basic switching paths contain three serial subcircuits with always exactly two parallel switching paths. Each of these switching paths consists of precisely one potentiometer and two parallel incandescent lamps.

The resistances of the lamps have to be provided with a default value L0 (default). The user should be given the opportunity to change this for all lamps together. The potentiometers are also to be equipped with a default value P0. After the program has started, a user has the option of setting as many potentiometer values within the permissible resistance range [0; Pmax]; Error inputs are to be intercepted with respect to the maximum value Pmax or negative values. At the moment of the input, the current value Pi should always be output.

The characteristic voltage Vi and the current intensity Ai should be able to be taken off at the respective positions of the luminous means. These are to be output to the user request.

2 Implementation requirements

Quantitative specifications can be implemented in the program code, but in all cases, the implementation must always be able to process any possible changes without errors.

To be used are essentially the technological programming tools presented in the event. The rules of structured programming must be observed!

The work environment and the platform, or the operating system in which the project is created, can be selected as desired. The completed program must be executed with every ANSI C89bzw. ISO C90 standard compiler in executable form. The following exceptions are permitted:

(1) Comments can also be specified in the line form with the double slash

(2) Variable definitions of run indices in for loops can be performed in the grinding head

Explanation / Answer

>> % Digital Filter Specifications:

>> vp = 0.2*pi; Xdigital Passband freq in Hz

>> vs = 0.3*pi; %digital Stopband freq in Hz

>> Rp = l; Wassband ripple in dB

>> As = 15; %Stopband attenuation in dB

>> % Analog Prototype Specifications:

2) T = 1; 7Set T=1

>> GmegaP = (Z/T)*tan(vp/S) ; 'Dreuarp Prototype Passband freq

>> GmegaS = (2/T)*ty(vs/2); XPrevarp Prototype Stopband freq

>> X Analog h-ototype Order Calculation:

>> N =cei1((1og10((10"(~p/10)-1)/(10~(~s/10~-1)~~/~2*1og10~Gmeg~/he@~~~ ;

>> fprintf ('U*** Buttervorth Filter Order = %2.0f J,N)

** Buttervorth Filter Order = 6

>> OmegaC = hegaP/((lO-(Rp/iO)-i)'(1/(2*N) 1) ; %Analog BW prototype cutoff

>> wn = 2*ataa((GmegaC*T)/2) ; %Digital BY cutoff freq

>> '/. Digital Buttervorth Filter Design:

>> vn = vn/pi; %Digital Butter cutoff in pi units

>> [b,d=butter (N,vn) ;

>> [bO,B,Al = dir2cas(b,a)