Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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"

1
vote
2answers
114 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 ...
0
votes
1answer
41 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 ...
0
votes
2answers
52 views

In Impedance track algorithm, How is resistance is related to soc(state of charge)?

In impedance algorithm for battery capacity, why we are calculating impedance and why it important to know impedance for SOC(state of charge)? 2.I doing some research on algorithms which we have,so,...
2
votes
1answer
75 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 ...
1
vote
1answer
94 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 ...
2
votes
1answer
109 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: ...
1
vote
1answer
88 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
0answers
66 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-...
0
votes
7answers
201 views

Embedded cascaded if-else statements

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 ...
0
votes
1answer
43 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 ...
0
votes
1answer
167 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 ...
0
votes
1answer
53 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 ...
0
votes
0answers
163 views

How to create a circuit to implement restoring division method?

I am trying to implement a circuit which will implement the restoring division method. The problem is, I can't understand how to configure the registers to do this operation. Here is the flowchart of ...
0
votes
1answer
318 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-...
0
votes
1answer
93 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 ...
1
vote
1answer
216 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 ...
0
votes
0answers
124 views

How to convert this ASM diagram to register transfer level?

So we have this ASM diagram, which I have to convert into register transfer level. I have already done some similar examples and I will usually start with defining next-state logic, than output ...
33
votes
6answers
9k views

Why does hardware division take much longer than multiplication?

Why does hardware division take so much longer than multiplication on a microcontroller? E.g., on a dsPIC, a division takes 19 cycles, while multiplication takes only one clock cycle. I went through ...
0
votes
2answers
1k views

FOC for a BLDC motor with Hall sensors but no encoder

I am trying to implement a FOC algorithm in an MCU to use with a BLDC motor. My problem is that I only have the Hall sensor feedback, no precise encoder can be used. With this 4 pole pairs motor, ...
1
vote
2answers
1k views

SRT division vs Non restoring division

Assuming base b=2, is there a particular advantage in terms of performance when comparing SRT division to non restoring division? In Non restoring division, for ...
0
votes
1answer
80 views

On-line arithmetic vs digit recurrence, are they different?

I'm looking at some reference to "On-line arithmetic",in chapter two of this PhD thesis there's a description of such methods. There's a recurrence derived at some point in such thesis that reminds me ...
2
votes
1answer
145 views

Tool, algorithm or method to know which resistors to use for an equivalent resistance \$R_T\$?

Say I have to get a resistance \$R_{T}\$ and I have a bunch of resistors, \$R_1, R_2, \ldots, R_n\$. Does there exist a tool, algorithm, or method that gets the resistance value closest to \$R_T\$ by ...
0
votes
2answers
380 views

Difference between cordic algorithm and table based methods for elementary functions computation

In this book both Table Based methods and Cordic iterations are explained. computationally speaking i suppose the Table based is usually faster, even though it probably requires more resource, while ...
1
vote
0answers
82 views

Three phase rectification algorithm

Let's suppose we have a three phase rectifier like here: https://www.youtube.com/watch?v=V6ZWYFTELQA Now lets suppose we change diodes with transistors. Let's also put current probes on each of the ...
1
vote
2answers
70 views

Voltage Drop Across Wire With Fixed Load Wattage

I am looking for an equation to calculate DC voltage drop across wires that run a distance, with a switching regulator and fixed load at the end (a known wattage). Here are the specifics: The power ...
8
votes
1answer
756 views

TMS320 Floating Point (Texas Instruments DSP from '98)

Background Is there anybody here who is an EE with programming experience who has worked with the Texas Instruments TMS320 C3X-series DSP? I am currently doing some work with the C3X for a project. ...
0
votes
2answers
242 views

How to sum two binary numbers

i have two binary number ...
9
votes
2answers
276 views

Calculate the resistances of all the possible connections inside a N-terminals black box based on measurements between terminals

Although it would seem that this is not the right SE for this thread since it is about creating an algorithm, the problem is actually about finding a systematic approach to the simplification of ...
6
votes
3answers
226 views

Detecting paired node combinations

My 2 year-old nephew likes nothing more than to plug/unplug RCA jacks. Whenever he's around, tv inputs get switched, audio plugs are swapped, etc. So... For his birthday, I decided to build him a ...
1
vote
1answer
323 views

Parity bit checks using General Hamming Algorithm

In a logic circuit, I have an 8-bit data vector that is fed into an ECC IC which I am supposed to develop the logic for and that contains a vector of 5 Parity Bits. My first step to develop the logic (...
5
votes
3answers
1k views

Software based Caller ID project- Problem with getting caller ID signal

Nowadays, I am trying to make a Caller ID project without using Caller ID ICs. Firstly, I have done a lot of research in Google to get information of phone lines and their electrical properties. I ...
15
votes
6answers
2k views

PID algorithm: how to account for fast input value changes after a long delay

I am trying to implement a basic PID algorithm on an Arduino Leonardo to mix hot and cold tap water using servo-controlled valves. The goal is to hold the temperature as close to a setpoint as ...
2
votes
1answer
319 views

faster extend 8-bit mask to 16-bit for MCU

Using an 8-bit flag register, the goal is to generate a 16-bit mask for manipulating a 2-byte settings register where adjacent pairs of bits control a channel, e.g. writing ...
2
votes
0answers
105 views

Proper term for electronic-ize(ing) an algorithm

Let us consider a certain computer program that converts sine values to cosine values: ...
-4
votes
2answers
890 views

elevator algorithm circuit [closed]

I'm trying to make a electirc circuit that features an elevator algorithm. It has five floors and I can only use resistor, capacitor, ua471 (op-amp) and switches. Please help
6
votes
3answers
9k views

How can a 8-bit CPU calculate big numbers?

I'm trying to design an instructable 8-bit CPU in Logisim. Is it possible to calculate big numbers with an 8-bit CPU? In a 32-bit computer, you can calculate numbers bigger than 32-bit, I think it's ...
3
votes
4answers
2k views

Are there good free software analog filter design tools? If not, why?

I'm finding myself needing to do a fair bit of analog filter design. Mostly passive LC ladder filters. I honestly don't know much about how to design them by hand, I've been using the Genesys tool. ...
1
vote
1answer
5k views

The difference between algorithmic state machine (ASM) and state transition graph

I have a very basic question. In what ways an algorithmic state machine (ASM) is different from a state transition graph (STG). Can someone take a very basic example (such as a binary counter) to ...
20
votes
5answers
8k views

Can FPGA out perform a multi-core PC?

I don't understand how FPGA can be used to accelerate an algorithm. Currently I'm running a time consuming real time algorithm on a quadcore laptop so that four computations can be done in parallel. ...
1
vote
3answers
595 views

Does it take long to implement RSA in hardware?

I just finished my first Digital Hardware course. We covered combinational circuits, sequential circuits and FSMs. We now need to create a final design project. We have 2 weeks to do so and we work ...
2
votes
1answer
393 views

Karplus Strong - getting a pluck of particular frequency

So I have been lately looking at a python implementation of Karplus Strong algorithm, or more particularly of the system: \$ y[n] = \alpha y[n-M] + x[n] \$ From what I understand, \$ x[n] \$ is ...
1
vote
2answers
107 views

Gait detection using acclerometer

Is it possible to detect whether a person is climbing or descending stairs using the data obtained from an accelerometer alone? EDIT If you have a accelerometer in your pocket(Mobile phone) then ...
3
votes
2answers
881 views

Implementation of coulomb counting

How do I implement coulomb counting algorithm ? Once I read the current using a ADC , what processing do I do ? say for 10ms load draws 1mA, next 5ms it draws 7mA. So am I supposed to just add the ...
3
votes
0answers
440 views

Help reverse engineering a CRC-8 [closed]

I have an arduino based home temperature monitoring system using Ambient Weather F007th wireless Thermo-Hygrometers as sensors. I am trying to work out the CRC and add some code to my project to ...
0
votes
1answer
458 views

Minimizing boolean algebra expressions

I am trying to re-implement the BCD to 7-SEGMENT converter by hand. So, I have came up with the following truth table: I have the following minimization created with the Karnaugh map. Is there any ...
0
votes
1answer
763 views

How to arrange resistors for certain resistance

This question is like this one. I have two 1 ohm resistors, six 2 ohm resistors, and want 2 ohms total. All resistors must be powered (since they are actually speakers.) How do I do this? Ideally, a ...
9
votes
1answer
10k views

AHRS algorithm under continuous linear accelerations

I have tried several algorithms to get pitch, roll and yaw under continuous linear accelerations and vibrations (smaller than 0.4g, frequency lower than 10HZ). None of them give good results because ...
2
votes
2answers
141 views

VHDL: Looping through a module asynchronously

I have a VHDL module that applies a shuffle algorithm to a 64 bit input and outputs the 64bit result. I need to loop this output back through the module exactly 4 times, i was wondering if there was ...
2
votes
1answer
3k views

Optimal sorting algorithm in a fpga

I have a fixed set of 9 values that needs to be sorted in an FPGA. What would be an optimal sorting algorithm to implement?
1
vote
2answers
454 views

Algorithm for finding next data in eeprom [closed]

I have an EEPROM and I'm storing data in it, from address 0x00 to 0xff. I have to scan the EEPROM regularly for non zero values. ...