# Questions tagged [algorithm]

An algorithm is an effective method that can be expressed within a finite amount of space and time and in a well-defined formal language for doing "just about anything"

103 questions
Filter by
Sorted by
Tagged with
1 vote
54 views

### Doubts on implementation of a beamforming algorithm to produce narrower beams

I am trying to understand and implement in MATLAB, the algorithm described in the paper A Beamforming Method Based on Polarization Matching but my math background is not strong nor am I used to ...
41 views

### What are the advantages of implementing an optimization algorithm for PID tuning compared to classical methods?

I am new to studying algorithms, so I am wondering what are the advantages of using an algorithm such as Genetic Algorithm or PSO to tune the PID parameters compared to classical methods, such as ...
• 11
92 views

### Are there any forward error correcting code algorithms for a partially reliable channel? [closed]

There are plenty or practical FEC algorithms - RS, Golay, convolutional codes of all sorts. All of them assume that the original data and the FEC code are sent over the same channel with the same ...
55 views

### How can I improve the algorithm for switching between lithium ion batteries with different voltages?

I have made a device which switches between 2 different lithium-ion batteries with different voltages and only puts them in parallel when their voltages are the same. Lithium-ion batteries' voltage ...
1 vote
121 views

### How to control the galvanometer scanner and XYZ stage to work synchronously via software?

I have a laser galvo scanners and XYZ stages. They are controlled separately by a servo control card and a galvanometer control card, and each performs well when working alone. Now I want to combine ...
• 111
97 views

### Floating point arithmetic - unexpected results in certain test cases

I was hoping I could get some help with a floating point adder I'm designing in verilog. The test case I am having trouble with is adding the following 2 numbers: ...
763 views

### Algorithm for converting a 128-bit value to a string

I am trying to convert 128-bit data to a string in a PLC, but the PLC has max. 32-bit data. I store 128-bit data as a byte array and bit array. Now I need to convert this value to a string, but the ...
• 53
201 views

### Making pedometer with accelerometer

I want to make pedometer with ADXL345 and ARDUINO UNO board. I am using ADXL345 with Full resolution ...
1 vote
79 views

### SRT division: correcting BSD quotient

I have been reading a lot about the SRT division algorithm lately and I understand that the main idea is that it allows us to skip over addition/subtraction, unlike non-restoring division where we ...
466 views

### VHDL: Booth's multiplication algorithm process block not working as intended?

I am trying to implement Booth's multiplication algorithm using this flowchart in VHDL. So far, I have written the code below: ...
• 383
116 views

### How to find minimum number of NAND gates for a given Boolean Expression by Using Genetic Alogorith(How to write a Code ) [closed]

I have been trying to write a code using gentic algorithm to find minimum number of NAND gates,but i have no idea of how to take a chromosome or case to find nand gates,and how to find fitness value ...
181 views

### How to calculate efficiency of an MPPT Algorithm

My PV system with an MPPT algorithm is extracting about 97% power of the Maximum power that can be extracted from the panel. However, the matching of the load through converter did not happen as ...
166 views

### Downsampling an audio signal, removing outlier values due to transistional spikes in the signal

I have an audio signal as following: I'm looking for a way to extract only the constant parts (in red,) or in other words, remove the outliers (in green.) I have very little knowledge in signal ...
• 131
799 views

### Is there a practical use for the Fibonacci sequence or similar fractal/sequence in Electrical Engineering?

One use of Fractal Engineering is in Fractal Antennas: An Overview of Fractal Antenna Engineering Research Abstract: Recent efforts by several researchers around the world to combine fractal geometry ...
• 2,840
4k views

### Algorithm for calculating prescaler and period of a timer

I want to set frequency of a timer in a microcontroller. Frequency is determined by Prescaler and Period (ARR). Both of these are 16bit integer numbers. f_{tim}=\frac{f_{clock}}{prescaler\cdot ...
• 1,294
1 vote
566 views

### behavior of a pipelined divider

Divider can be made combinational, which uses more logic gates.. Divider can be made sequential, the throughput may stay the same, i.e. use as many stages as the width of the dividend (assuming width ...
90 views

### Question about shortest-path algorithm during synchronous circuit synthesis

In Retiming synchronous circuitry , why put a negative sign to d(u) in step 1 ? Why there is no subtraction operation for W(u, v)...
• 413
79 views

### Transfer function : Determination [closed]

I have the below circuit, here, I have Is and Va are measurable quantities. Rc1..Rc4 and Rbd are unknown variables for which I intend to derive transfer function. I have flexibility of adding ...
• 121
4k views

### Help developing rpm calculation from encoder pulses

I have having a bit of difficulty calculating rpm of a motor using feedback from an encoder. The encoder datasheet is attached here: Encoder datasheet. The encoder has two channels at 1000 PPR, so ...
• 1,480
34 views

### What algorithm for feedback control to maintain heart rate on a turbo trainer

I am writing an application that will maintain heart rate within a specified range by adjusting the amount of work required on a turbo trainer. I could cobble together something that would gradually ...
• 101
62 views

### What do the K and N in the triangles mean?

This is a block diagram for a detection algorithm later implemented into a circuit.
76 views

### What is throughput as far as processors are concerned?

My teacher showed some algothrims, RR, FCFS and others. In the end he exposed a table with throughput of the algorithms. He explained what thoughput is but he failed miserably. He first said that ...
• 584
1 vote
722 views

### Where to find winding diagram for a 56 pole 63 slot BLDC motor?

I'm working on an algorithm to control a BLDC motor with 56 poles and 63 slots. I'm using trapezoidal control. By employing usual switching sequence (CA - CB - AB - AC - BC BA) I'm missing one step in ...
378 views

### What is the fastest (in clock cycles) 16-bit x 16-bit unsigned integer division algorithm that will run on an ATMEGA1284?

What is the fastest (in clock cycles) division algorithm that will run on an ATMEGA1284? The dividend is an unsigned 16-bit number passed into the algorithm in a pair of 8-bit registers. The divisor ...
• 12.2k
94 views

### the idea behind signal processing [closed]

Is how we detect signals that we start the transceiver in a sampling period at a certain frequency and we take the convolution of it and all incoming signals during that period? When we transform we ...
1 vote
216 views

### How do you choose loops for the loop circuit method?

I need to understand how to choose loops for the loop current method of circuit analysis; ideally I'd like to be able to do it by means of an algorithm, so a vague intuition isn't sufficient. Can ...
1 vote
1k views

### IMU Madgwick filter pitch effect on roll and yaw

Using even Madgwick provided raw data, algorithm gives inaccuracies on roll and yaw when only pitch angle applied. This is also valid for our data which is collected with BMX055. We apply only pitch, ...
• 475
33 views

I have designed a model reference adaptive controller for which I have obtained the step response for different values of adaptation gain. I have attached the output graph obtained. Can anyone please ...
• 11
569 views

### Drift with Madgwick algorithm with fast movements

I am trying to correctly track orientation of a sensor with accelerometer and gyroscope using the open source Madgwick algorithm. The algorithm returns quaternions which represent the rotation between ...
• 51
252 views

### How to express a logic sequence of a control circuit operation for a motor control center?

I have a customer to which I need to explain the logic sequence of the operation of the motor control centre's control schematics. The MCC has a complex RVSS unit for which the logic sequence has a ...
• 327
55 views

### How exactly could you prove the following question about quantum computing?

Consider a function f mapping a bit onto another bit, i.e. f:{0,1}---> {0,1}. The function f is either constant, so f(0)= f(1) or balanced, so f(0)different f(1). Thq qunatum gate for the Deutsch ...
167 views

### c2000 microcontroller sensorless speed control implementaion

I want to know some detail about TMS320F28335 TI microcontroller for sensored and sensorless speed control of SPMSM. I have implemented the MATLAB simulation and the model is working well but for ...
42 views

### Fusion algorthm: how many DoF for the gyroscope?

The gyro data output will be fed to an Extended Kalman Filter and fused with data output from an accelerometer. my goal is to measure tilt angle over one axis. Do I need a 3 DoF gyro or will a 1 DoF ...
• 1,062
1k views

### BLDC startup algorithm

How do real world algorithms for sensorless BLDC motors handle startup under load? Right now I run phase 1 for a few milliseconds to get the rotor in a known position, the I run open loop for a ...
• 475
187 views

### Algorithm for getting currents and voltages from resistances in circuit as graph

For my CS project I have to write simple circuit simulator, where I get list of edges of circuit as (a,R,b), where a and b are nodes at the end of the edge and R is it's resistance (it has a resistor ...
• 101
1 vote
212 views

### How to analyze Microcontroller input-logic-signal without ADC?

I have a signal which is fed to one of the digital inputs of a microcontroller (PIC16F18326). The signal is shown in the image-1 below. This is during the normal operation of the circuit, that means ...
163 views

### Which Approach is Better to Drive Brushless DC Motor with PWM Duty Cycle

I'm doing a project that use brushless geared DC motor, the motor is connected to a moving platform. I will drive the motor with PWM, the motor then move the platform from -a degree to a degree ...
• 37
753 views

### In the impedance track algorithm, how is resistance related to state of charge?

In the impedance algorithm for battery capacity, why do we calculate the impedance? Why is it important to know the impedance for state of charge?
• 35
519 views

### What are different battery capacity algorithms used? [closed]

I need to implement an algorithm to know the capacity of a battery. I don't want to use any external gauges which are available on the market. Can you suggest which algorithm(s) is/are popular? Can ...
• 35
1 vote
112 views

### Purpose of 2nd order filter for processing temperature measurement

Please forgive me if this is a very basic or silly question but I would appreciate some help. I'm working on someone else's code and have come across a few lines that have been described as a 2nd ...
• 65
651 views

### Why overflows are omitted in the non-restoring hardware binary division algorithm?

I'm reading a book about a non-restoring binary division algorithm, for example 52_octal divided by 41_octal: ...
• 121
1 vote
258 views

### How to write a for-generate statement to generate multiple instances of this parallel sorting network circuit?

I'm trying to implement a parallel sorting network. I'm curious to how one would write a for-generate statement to generate 128 instances of this sorting circuit? It's supposed to sort 256 8-bit ...
1 vote
212 views

### How to improve AHRS algorithm

I'm currently working on a project with multiple IMUs mounted on moving vehicle estimating their pose. I've just read about AHRS algorithms. So I have two questions about them: Since my data is pre-...
• 360
230 views

I'm designing an MCU based acoustic guitar tuner. I've broken the frequency spectrum from note C2 (65.41 Hz) to note C5 (523.25 Hz) into many sub-bands to give the user an accurate depiction of what ...
• 1,167
62 views

### Extract a motion filter using camera movement in number of pixel and angle, in VHDL or Verilog

I have read some papers about the topic and searched some MATLAB algorithm. There is one called 'fspecial' in MATLAB. And it could return a Motion filter, when motion is given in number of pixel and ...
• 125
647 views

### Finding if a value is among an array using a FPGA

I've been doing a lot of software engineering, and find myself intrigued by the hardware implementation of things to the extent that I'd like to port one of my recent algorithms to an FPGA. Trying to ...
• 101
57 views

### What name is given to conversion between data of different widths?

Assuming e.g that one part of design transmits 8 bit data word at a time but receiver needs a 16 bit word, we would need to concatenate two 8 bit words together to create a 16 bit word. If both ...
• 11.9k
2k views

### ST's FOC for BLDC start up errors

I am using ST's FOC library 4.3. I am able to run my NovoMotec motor as I want, with the Observer + PLL configuration. Often (1 out of 5) during the start -up period, my motor stops, and I get a start-...
282 views

### I have a 5 bit decrementer. Using control i/p R, use the decrementer and 2-i/p XOR gates to obtain incrementer when R=0 and a decrementer when R = 1

The progress I made is that I used a XOR gate with the complement of R, to be fed as input to each of the first 4 inputs of the decrementer. It doesn't seem to work for all input combinations. I ...
• 171
1 vote
550 views

### Parallel resistor algorithm

I have build a circuit that functions as a variable load. It consists of 4 resistors in parallel - let's call them R1,R2,R3,R4 - each with an activation switch (implemeted with a transistor). R1 has ...
• 113