Tiago Oliveira Weber

About

photob.jpg

I am currently a professor at the Federal University of Rio Grande do Sul (UFRGS), Porto Alegre, Brazil. Previously, I was a professor at the Federal University of Santa Catarina (UFSC) at the Araranguá campus. I was a member of the Integrated Systems Laboratory (LSI) where my work was related to the design and test of an ASIC for the Time Projection Chamber of the ALICE experiment in LHC (Large Hadron Collider) - CERN. I have obtained my Doctoral Degree in Microelectronics at the University of São Paulo (USP) in 2015 and the B.Sc. degree in Electrical Engineering at the Federal University of Santa Maria in 2010.

Research Interests

My main research interests are:

  • artificial intelligence hardware (mixed-signal hardware accelerators) and analog computing.
  • CAD tools for analog integrated circuits;
  • optimization, metaheuristics and artificial intelligence techniques;
  • data acquisition and instrumentation.

Goals

Our plans for the future are as important as where we are right now. To provide a better insight about my professional goals, I've decided to share my short and long-term objectives.

5-year goal (renewed, from 2022 to 2027): become a leading researcher in artificial intelligence hardware (mixed-signal hardware accelerators for AI applications) applied to sensor-based systems;

10-year goal (renewed, from 2022 to 2032): become an international leading researcher in artificial intelligence hardware applied to sensor-based systems;

Contact

Curriculum

Education

Doctoral Degree in Microelectronics - June 2015

University of São Paulo - São Paulo, Brazil

  • Dissertation Title (translated from Portuguese): Synthesis of analog integrated circuits in system-level and circuit-level using modern optimization methods
  • Research Synopsis: analog integrated circuits are very important in modern electronic systems, performing tasks such as analog to digital conversion, digital to analog conversion, radio frequency communication, filtering and others. The design of this type of circuit requires attending to several performance specifications, being usually performed only by experienced designers. We developed techniques for the design of circuit-level and system-level analog circuits. As the optimization core, we proposed an algorithm based on Simulated Annealing while considering multiobjective information through the use of a crossover operator. An hybrid algorithm combining the proposed algorithm with Particle Swarm Optimization was created to properly explore the Pareto front. Tests indicated the algorithms are efficient for the design of analog circuits as well as outperform many other derivative-free algorithms when applied to purely mathematical problems.

B.Sc. in Electrical Engineering - Jan. 2010

Federal University of Santa Maria - Santa Maria, Brazil

  • Undergraduate Thesis Title (translated from Portuguese): Tool for integrated circuit synthesis with an educational approach

– Modules included:

  • Analog Integrated Circuits Design
  • Special Topics in Microelectronics
  • Programmable Logic Systems
  • Conception of Integrated Circuits
  • Data Communication
  • Signal Processing

Research

Here you will find:

  • My research projects and goals
  • My publications

I'm currently a member of the IEE-IA lab (https://www.ufrgs.br/ieelab/index.php).

Research Projects and Goals

By sharing my research projects and goals, the objective is to communicate my professional road map to current and potential collaborators (other researchers, students and companies).

Artificial Intelligence - Hardware Accelerators

This research line objective is the development of integrated circuits to provide hardware acceleration for Artificial Intelligence applications. Analog and mixed-signal solutions are being studied to improve figures-of-merit on hardware-based machine learning.

Microelectronics / Analog Design Synthesis

This research line aims at the development of techniques for analog design synthesis in circuit and system level. The objective is to advance the state-of-the art in analog circuit synthesis/optimization by bridging system-level optimization with circuit-level optimization.

Artificial Intelligence applied to Instrumentation

This research line objective is the development of new Artificial Intelligence techniques directed at instrumentation applications.

Publications

Journal publications (per topic)

  • MARTINS, T. M.; BROWN, J. P. D.; SCHMIDT, T. P.; SOBIERANSKI, A. C.; DUTRA, R. C.; WEBER, T. O. A machine learning approach to immobility detection in mice during the tail suspension test for depressive-type behavior analysis. Research on Biomedical Engineering, 2022. Link

  • CABRERA, F. L., WEBER, T. O. A Rail-to-Rail Topology for CMOS Neuron Cells with Analog Inputs-Output and Digital Weights. International Journal of Electronics, DOI: 10.1080/00207217.2021.1969440, 2021. Link
  • WEBER, T. O., CABRERA, F. L., LABRES, D. da S. Topology Variations of an Amplifier-based MOS Analog Neural Network Implementation and Weights Optimization. Analog Integrated Circuits and Signal Processing, 106(3), 635-647, DOI 10.1007/s10470-021-01798-y, 2021. Link

alog2021_topologies.png Neuron topologies. Image from the paper above.

  • ROQUE, Felipe, CECHINEL, Cristian, WEBER, T. O., LEMOS, Robson, VILLARROEL, R., MIRANDA, D.; MUNOZ, R. Using Depth Cameras to Detect Patterns in Oral Presentations: A Case Study Comparing Two Generations of Computer Engineering Students. Sensors, DOI 10.3390/s19163493, 2019. Link

body_postures.png Setting environment. Image from the paper above.

  • ADOLFSSON, J. et al. The upgrade of the ALICE TPC with GEMs and continuous readout, Journal of Instrumentation, v. 16, n. 3, P03022, 2021. Link
  • HERNANDEZ, H.; SANCHES, B.; CARVALHO, D.; BREGANT, M.; PABON, A. A.; WILTON, R.; HERNANDEZ, R. A.; WEBER, T. O.; COUTO, A.; LOMBARDI, A.; ALARCON, H.; MARTINS, T. A.; MUNHOZ, M. G.; NOIJE; W. V. A Monolithic 32-channel Front-End and DSP ASIC for Gaseous Detectors. IEEE Transactions on Instrumentation and Measurement, DOI 10.1109/TIM.2019.2931016, 2019. Link
  • ADOLFSSON, J.; PABON, A. AYALA; BREGANT, M.; BRITTON, C.; BRULIN, G.; CARVALHO, D.; CHAMBERT, V.; CHINELLATO, D.; ESPAGNON, B.; HERRERA, H.D. HERNANDEZ; LJUBICIC, T.; MAHMOOD, S.M.; MJÖRNMARK, U.; MORAES, D.; MUNHOZ, M.G.; NOËL, G.; OSKARSSON, A.; OSTERMAN, L.; PILYAR, A.; READ, K.; RUETTE, A.; RUSSO, P.; SANCHES, B.C.S.; SEVERO, L.; SILVERMYR, D.; SUIRE, C.; TAMBAVE, G.J.; TUN-LANOË, K.M.M.; NOIJE, W. VAN; VELURE, A.; VERESCHAGIN, S.; WANLIN, E.; WEBER, T.O.; ZAPOROZHETS, S. SAMPA Chip: the New 32 Channels ASIC for the ALICE TPC and MCH Upgrades. Journal of Instrumentation, v.12, p.C04008 - C04008, 2017. Link
  • BARBOZA, S.H.I. ; BREGANT, M. ; CHAMBERT, V. ; ESPAGNON, B. ; HERRERA, H.D. HERNANDEZ ; MAHMOOD, S.M. ; MORAES, D. ; MUNHOZ, M.G. ; NOËL, G. ; PILYAR, A. ; RUSSO, P. ; SANCHES, B.C.S ; TAMBAVE, G.J. ; TUN-LANOË, K.M.M. ; NOIJE, W. VAN ; VELURE, A. ; VERESCHAGIN, S. ; WEBER, T.O. ; ZAPOROZHETS, S. . SAMPA chip: a new ASIC for the ALICE TPC and MCH upgrades. Journal of Instrumentation, v. 11, p. C02088-C02088, 2016. Link

sampa_board.jpg SAMPA Chip. Photo: Marcos Santos/USP Imagens

  • WEBER, T.O.; NOIJE, W.A.M.V. Analog Circuit Synthesis Performing Fast Pareto Frontier Exploration and Analysis Through 3D Graphs. Analog Integrated Circuits and Signal Processing, Springer US, v. 73, n. 3, p. 861-871, ISSN 0925-1030, 2012; Link

pareto_miller.png

  • WEBER, T.O.; NOIJE, W.A.M.V. Multi-Objective Design of Analog Integrated Circuits using Simulated Annealing with Crossover Operator and Weight Adjusting. JICS. Journal of Integrated Circuits and Systems, v. 7, n. 1, p. 1-9, ISSN 1807-1953, 2012. Link, Link.

Book chapter

  • WEBER, T.O.; NOIJE, W.A.M.V. Design of Analog Integrated Circuits using Simulated Annealing/Quenching with Crossovers and Particle Swarm Optimization. Simulated Annealing - Advances, Applications and Hybridizations, v. 1, p. 219-244, Ed. InTech, ISBN 978-953-51-0710-1, 2012. Link

sa_crossover_pso.jpg

Conference publications

  • BUSCHETTO, L. A.; ROQUE, F. V.; CASAGRANDE, L.; WEBER, T. O.; CECHINEL C. A Block-Processing Approach Using Texture Analysis for Fabric Defect Detection In: Anais do Computer on the beach, Florianópolis, SC, 2020. Link
  • ROQUE, F.; CECHINEL, C.; MUNÕZ, R.; LEMOS, R.; WEBER, T. O. Encontrando os padrões sequenciais em apresentações orais de estudantes utilizando Sequential Pattern Mining In: Anais do Simpósio Brasileiro de Informática na Educação (SBIE), 2019. Link
  • WEBER, T. O.; LABRES, D. S.; CABRERA, F. L. Amplifier-based MOS Analog Neural Network Implementation and Weights Optimization In: Proceedings of the 32nd Symposium on Integrated Circuits and Systems Design (SBCCI), 2019, São Paulo, SP. Link (won SBCCI Best Paper Award)
  • ROQUE, F. V.; MACARINI, L. A.; CROTTI, Y.; WEBER, T. O., CECHINEL, C. Detecção de defeitos visuais em tecidos utilizando Wavelets e algoritmos de aprendizado de máquina In: Anais do Computer on the beach, 2019, Florianópolis, SC. Link
  • MARTINS, J. F.; WEBER, T. O. Sistema Matricial de Interconexão Programável para Aplicação em Laboratórios Remotos de Eletrônica Analógica In: Anais do 7º Simpósio de Integração Científica e Tecnológica do Sul Catarinense (SICT-SUL), 2018, Araranguá, SC. Link
  • MARTINS, J. F.; WEBER, T. O. Matriz de Interconexão Eletrônica Programável de Baixo Custo para Aplicação em Laboratório Remoto e Prototipagem Rápida In: Anais do Simpósio Ibero-Americano de Tecnologias Educacionais (SITED), 2018, Araranguá, SC.
  • MACARINI, L. A.; WEBER, T. O. Quality Control System for Ceramic Tiles using Segmentation-based Fractal Texture Analysis and SVM In: CONFERENCE ON GRAPHICS, PATTERNS AND IMAGES, 30. (SIBGRAPI), 2017, Niterói, RJ. Link
  • WEBER, T.O.; CHAPARRO, S.; NOIJE, W.A.M.V. Synthesis of a Narrow-band Low Noise Amplifier in a 180 nm CMOS Technology using Simulated Annealing with Crossover Operator. In: Proceedings of the 26th Symposium on Integrated Circuits and Systems p. 1-5, Curitiba, Brasil, 2013. Link
  • WEBER, T.O.; NOIJE, W.A.M.V. Analog Design Synthesis Performing Fast Pareto Frontier Exploration. In: Proceedings of the 2nd IEEE Latin American Symposium on Circuits and Systems, p. 62-66, ISBN 978-1-4244-9484-2, Bogotá, Colômbia, 2011; Link
  • WEBER, T.O.; NOIJE, W.A.M.V. Analog Design Synthesis Method Using Simulated Annealing and Particle Swarm Optimization. In: Proceedings of the 24th Symposium on Integrated Circuits and Systems, p. 85-90, ISBN 978-1-4503-0828-1, João Pessoa, Brasil, 2011. Link
  • WEBER, T.O.; RODRIGUES, C. R. Automatic LC Oscillator Systematic Design using Matlab and SPICE Interaction Iberchip Workshop, XV, Buenos Aires - Argentina, March 2009
  • HAYASAKA, H.; WEBER, T. O.; RODRIGUES, C. R. Oscilador LC à 2,4GHz Controlado por Tensão em Tecnologia AMI 05 Jornadas de Jóvenes Investigadores, XVI, Montevideo - Uruguay, October 2008

Teaching and Academic Advisory

Classes at the Federal University of Rio Grande do Sul (UFRGS)

My lectures at UFRGS are mainly to the Electrical Engineering course.

  • Second semester of 2023:
    • Instrumentation A (in Portuguese: "Instrumentação A"): theoretical and laboratory classes.
    • Special Topics on Electrical Engineering (in Portuguese: "Tópicos Especiais em Engenharia Elétrica"): class related to optimization and artificial intelligence applied to analog circuit and system design
  • First semester of 2022:
    • Instrumentation A (in Portuguese: "Instrumentação A"): theoretical and laboratory classes.
    • Special Topics on Electrical Engineering (in Portuguese: "Tópicos Especiais em Engenharia Elétrica"): class related to optimization and artificial intelligence applied to analog circuit and system design
    • Post-graduation class (PPGEE): Special Topics on Instrumentation: class related to Computational Intelligence in Hardware
  • Second semester of 2022:
    • Instrumentation A (in Portuguese: "Instrumentação A"): theoretical and laboratory classes.
    • Special Topics on Electrical Engineering (in Portuguese: "Tópicos Especiais em Engenharia Elétrica"): class related to optimization and artificial intelligence applied to analog circuit and system design
  • First semester of 2022:
    • Instrumentation A (in Portuguese: "Instrumentação A"): theoretical and laboratory classes.
    • Special Topics on Instrumentation II (in Portuguese: "Tópicos Especiais em Instrumentação II"): class related to computational intelligence in hardware
  • Second semester of 2021:
    • Instrumentation A (in Portuguese: "Instrumentação A"): theoretical and laboratory classes. Due to the Covid-19 pandemic, laboratory classes were replaced by simulations and intelligent instrumentation computational experiments.
  • First semester of 2021:
    • Instrumentation A (in Portuguese: "Instrumentação A"): theoretical and laboratory classes. Due to the Covid-19 pandemic, laboratory classes were replaced by simulations and intelligent instrumentation computational experiments.
  • Second semester of 2020:
    • Instrumentation A (in Portuguese: "Instrumentação A"): theoretical and laboratory classes. Due to the Covid-19 pandemic, laboratory classes were replaced by simulations and intelligent instrumentation computational experiments.
    • special topics on Instrumentation I (in Portuguese: "Tópicos Especiais em Instrumentação I"): class related to computational intelligence
  • First semester of 2020:
    • Instrumentation A - laboratory classes (in Portuguese: "Instrumentação A"). Due to the Covid-19 pandemic, laboratory classes were replaced by simulations and intelligent instrumentation computational experiments.
    • Special Topics on Instrumentation I (in Portuguese: "Tópicos Especiais em Instrumentação I"): class related to computational intelligence
  • Second semester of 2019 (second half):
    • Instrumentation A - laboratory classes (in Portuguese: "Instrumentação A")
    • Electricity - (in Portuguese: "Eletricidade"): class taught to the Mechanical Engineering course

Classes at the Federal University of Santa Catarina (UFSC)

My lectures at UFSC were to the Computer Engineering course:

  • Second semester of 2019 (first half):
    • Signal Acquisition Systems (in Portuguese: "Sistemas de Aquisição de Sinais")
    • special topics on Analog Electronics (in Portuguese: "Tópicos Especiais em Eletrônica Analógica")
    • Data Communication (in Portuguese: "Comunicação de Dados")
  • First semester of 2019:
    • Electric Circuits for Computer Engineering (in Portuguese: "Circuitos Elétricos para Computação")
    • Signal Acquisition Systems (in Portuguese: "Sistemas de Aquisição de Sinais")
  • Second semester of 2018:
    • Electric Circuits for Computer Engineering (in Portuguese: "Circuitos Elétricos para Computação")
    • Data Communication (in Portuguese: "Comunicação de Dados")
    • Signal Acquisition Systems (in Portuguese: "Sistemas de Aquisição de Sinais")
  • First semester of 2018:
    • Data Communication (in Portuguese: "Comunicação de Dados")
    • Signal Acquisition Systems (in Portuguese: "Sistemas de Aquisição de Sinais")
  • Second semester of 2017:
    • special topics on Analog Microelectronics (in Portuguese: "Tópicos Especiais em Microeletrônica Analógica")
    • Data Communication (in Portuguese: "Comunicação de Dados")
    • Signal Acquisition Systems (in Portuguese: "Sistemas de Aquisição de Sinais")
  • First semester of 2017:
    • special topics on Analog Microelectronics (in Portuguese: "Tópicos Especiais em Microeletrônica Analógica")
    • Electric Circuits for Computer Engineering (in Portuguese: "Circuitos Elétricos para Computação")
    • Signal Acquisition Systems (in Portuguese: "Sistemas de Aquisição de Sinais")
  • Second semester of 2016:
    • Electric Circuits for Computer Engineering (in Portuguese: "Circuitos Elétricos para Computação")
    • Data Communication (in Portuguese: "Comunicação de Dados")
    • Signal Acquisition Systems (in Portuguese: "Sistemas de Aquisição de Sinais")
  • First semester of 2016:
    • Electric Circuits for Computer Engineering (in Portuguese: "Circuitos Elétricos para Computação")
    • Fundamentals of Mathematics to Computer Science (in Portuguese: "Fundamentos Matemáticos para Computação")

Honors

related to my teaching activity at UFRGS

  • Paraninfo da turma 2023/1 de Engenharia Elétrica da Universidade Federal do Rio Grande do Sul (UFRGS);
  • Professor homenageado da turma 2022/1 de Engenharia Elétrica da Universidade Federal do Rio Grande do Sul (UFRGS);
  • Professor homenageado da turma 2021/2 de Engenharia Elétrica da Universidade Federal do Rio Grande do Sul (UFRGS);
  • Professor homenageado da turma 2021/1 de Engenharia Elétrica da Universidade Federal do Rio Grande do Sul (UFRGS);
  • Prêmio Destaque Docente no aniversário de 125 anos da Escola de Engenharia da UFRGS.

related to my teaching activity at UFSC

  • Patrono da turma 2021/1 de Engenharia de Computação da Universidade Federal de Santa Catarina (UFSC), campus Araranguá;
  • Patrono da turma 2020/1 de Engenharia de Computação da Universidade Federal de Santa Catarina (UFSC), campus Araranguá;
  • Professor homenageado da turma de Engenharia de Computação - Turma 2019/2.

Short Course

  • Course in GNU Octave / Matlab and Applications for Engineers (in Portuguese: "Curso de GNU Octave / Matlab e Aplicações para Engenheiros"). This material was presented at the II Computer Engineering Academic Week in March 2018 at UFSC - Campus Araranguá - Presentation in Portuguese

Academic Advisory

  • Bruno Moreira Nabinguer. A Deep Learning Palpebral Fissure Segmentation Model in the Context of Computer User Monitoring. 2023. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber.
  • Lucas Moraes. Detecção de defeitos de fabricação em Placas de Circuito Impresso utilizando Aprendizado Profundo. 2023. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber.
  • Germano Smagniotto. Super-Resolução De Áudio utilizando Redes Neurais Artificiais. 2023. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber.
  • Rafael Coimbra Gus. Detecção de Esquizofrenia por meio de Aprendizado de Máquina a partir da Análise de ERP em Dados De EEG. 2023. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber.
  • Alvaro Javier Zamudio Sanchez. Classificação de imagens coletadas de câmeras de evento por meio de SNNs (Spiking Neural Networks). 2023. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber.
  • Vinícius Cella Ceriotti. Classificação de Sons Ambientais utilizando Redes Neurais Convolucionais para aplicações em Hardwares com Recursos Limitados. 2023. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber.
  • Giovanni Gaiardo. Identificação e Cadastro de Medidores de Energia Elétrica Utilizando Técnicas de Aprendizagem de Máquina. 2023. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber. Link.
  • Wagner Jose Cunha. Sistema de Assistência para Pilotos de Automobilismo Aplicado para Pilotos Amadores de Kart. 2022. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber. Link.
  • Matheus Quevedo Sivelli. Avaliação de Redes Neurais do Tipo Long Short-Term Memory e Multilayer Perceptron para Predição do Valor da Cotação das Ações das Cinco Empresas mais Representativas do Ibovespa. 2022. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber. Link.
  • João Pedro Jacques Hoss. Comparação de técnicas de aprendizado de máquina para a classificação de gestos para um sistema de interface homem-máquina sem contato. 2022. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber. Link.
  • Lucas Raupp Hans. Sistema de classificação de tipos de movimentos no esporte tênis utilizando sensores inerciais e técnicas de aprendizado de máquina supervisionado. 2022. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber. Link
  • Lucas Henz Garcia. Detecção de emoções utilizando redes neurais convolucionais em sistemas com recursos limitados de hardware. 2021. Trabalho de Conclusão de Curso. (Graduação em Engenharia Elétrica) - Universidade Federal do Rio Grande do Sul. Orientador: Tiago Oliveira Weber. Link
  • Thiago Matias Martins. Aplicação de Técnicas de Inteligência Artificial na Detecção do Comportamento Tipo-Depressivo em Camundongos através do Teste de Suspensão pela Cauda. 2018. Trabalho de Conclusão de Curso. (Graduação em Engenharia de Computação) - Universidade Federal de Santa Catarina. Orientador: Tiago Oliveira Weber. Link
  • Leonardo Loch da Silva. Sistema de monitoramento de energia elétrica utilizando o protocolo de comunicação MQTT. 2018. Trabalho de Conclusão de Curso. (Graduação em Engenharia de Computação) - Universidade Federal de Santa Catarina. Orientador: Tiago Oliveira Weber. Link
  • Julyan Figueredo Martins. Matriz de Interconexão Eletrônica Programável para Prototipagem Rápida e Experimentação Remota. 2018. Trabalho de Conclusão de Curso. (Graduação em Engenharia de Computação) - Universidade Federal de Santa Catarina. Orientador: Tiago Oliveira Weber. Link
  • Felipe Vieira Roque. Sistema de detecção de defeitos em tecidos utilizando algoritmos de classificação e wavelets. 2017. Trabalho de Conclusão de Curso. (Graduação em Engenharia de Computação) - Universidade Federal de Santa Catarina. Orientador: Tiago Oliveira Weber. Link
  • Luiz Antonio Buschetto Macarini. Sistema de detecção de defeitos em pisos cerâmicos baseado em processamento de imagens e aprendizado de máquina. 2017. Trabalho de Conclusão de Curso. (Graduação em Engenharia de Computação) - Universidade Federal de Santa Catarina. Orientador: Tiago Oliveira Weber. Link

Blog

Integrate your Circuit Design Flow and Reports: Demonstration of Ngspice and Octave/Matlab Interaction within Emacs

by Tiago Oliveira Weber <04/08/2016-qui>

Can you imagine being able to explore new design ideas, perform calculations, run circuit simulations, calculate some more based on the results and generate reports, all in the same place? Well, you can stop imagining and start developing your next electric/electronic project on Emacs.

Recently, I've made a blog post introducing ob-spice, which is a simple language extension to ob-babel to be able to simulate Ngspice within Emacs. In the present post I will show how we can use ob-spice to perform interaction between Ngspice, Octave (or Matlab) and any other language of our interest. While the experienced org-mode user would already assume this interaction possible from ob-babel features, it is the first demonstration of ob-spice receiving vector inputs (a new feature to ob-spice) and producing outputs back to other languages.

In our example we will design a simple opamp inverting topology. For that purpose, we will calculate the resistor values in Octave/Matlab, pass the values to … Read more

Back home

Design Automation Conferece (DAC) Video About Moving EDA Tools to Open Source

by Tiago Oliveira Weber <06/07/2016-qua>

The 53rd Design Automation Conference had a great discussion about opportunities for open source tools on the Electronic Design Automation world and market models for existing companies. Luckily for all of us, the panel video is available online on YouTube's DAC TV channel with the title "Lanza’s Tech Vision Challenge: Daring to Move to Open Source". The moderator was Lucio Lanza (from Lanza TechVentures) and the panelists were Warran Savage (from IP Extreme), Mark Templeton (from Scientific Ventures) and Michael Wishart (from eFabless).

In my opinion all participants were very rational on their statements although having different points of view. I, as an open source advocate, felt very glad this type of discussion is taking place in such a relevant conference and with people that know from the inside out how the current EDA business works. … Read more

Back home

Software/Hardware Integration Lab

by Tiago Oliveira Weber <27/06/2016-seg>

I am now a member of the Software/Hardware Integration Lab (LISHA) at the Federal University of Santa Catarina. According to the official site:

The Software/Hardware Integration Lab (LISHA) was founded in 1985 to promote research in the frontiers between hardware and software. Since then, it has dedicated considerable efforts to research in areas such as computer architecture, operating systems, computer networks and the related applications. Currently, the laboratory focuses on innovative techniques and tools to support the development of embedded systems.

My webpage at LISHA is https://lisha.ufsc.br/Weber and the announcement (in portuguese) of the start of LISHA at UFSC Araranguá is here. … Read more

Back home

Simulating Circuits with Emacs, Org-mode, Babel and Ngspice

by Tiago Oliveira Weber <26/06/2016-dom>

Picture this. You are creating a report, studying or preparing a class. While you write your text, you suddenly feel that it is time to show in a circuit how your project works. Now the adventure begins: to add the results of a given simulation to your document, you will have to open your simulation software in another window, describe the circuit using a schematic editor, simulate it and then copy and paste the results to your text file. You might as well copy the image of some waveforms. Additionaly, you will also have to describe the circuit elements in such a way that the reader of your report knows what you have simulated.

In this process a lot can be lost: the quality of your schematic screenshots may or may not be a delight to the eyes, but even if the quality is great, there is still a lot of information that is not accessible through an image of the schematic. These can be the various component properties, simulation parameters and component models. In top of that, if you are like me, you will probably spend a lot of time editing and working with the waveforms to make them fit … Read more

Microelectronics

Map of Microelectronics in Brazil

This map is an attempt to help the visualization of microelectronics in Brazil. Special thanks to Andre Couto and Luciana Shiroma for supplying inicial information about the private companies.

List

Journal links

This is a list of some relevant journals in my fields of interest.

The classification (A1, A2, B1,…) next to the journal name or section is extracted from the Qualis system (used to evaluate scientific production in graduation programs in Brazil - link).

Supplementary material

For students enrolled in "Tópicos Especiais em Instrumentação II" (special topics on Instrumentation II)

Model Optimization

Links
Examples
  • Test using tflite for a MLP
import os
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder, MinMaxScaler, StandardScaler

from keras.models import Sequential
from keras.layers import Dense

import tensorflow as tf


data = datasets.load_iris()

X = data['data']
Y = data['target']

# use and the scaled input the encoded output
enc = OneHotEncoder()
Y_enc = enc.fit_transform(Y[:, np.newaxis]).toarray()
Y = Y_enc

scaler = MinMaxScaler()
X_scaled = scaler.fit_transform(X)
X = X_scaled

X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.3, random_state=0)

num_features = X.shape[1]
num_classes = Y.shape[1]

batch_size = 1
epochs = 100


model = Sequential()
model.add(Dense(5, input_dim=num_features, activation='tanh'))
model.add(Dense(num_classes, activation='softmax'))
model.summary()

model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])

history = model.fit(X_train, Y_train,
                    batch_size=batch_size,
                    epochs=epochs,
                    verbose=1,
                    )

score_train = model.evaluate(X_train, Y_train, verbose=0)
print('Train loss:', score_train[0])
print('Train accuracy:', score_train[1])

score_test = model.evaluate(X_test, Y_test, verbose=0)
print('Test loss:', score_test[0])
print('Test accuracy:', score_test[1])

# *****************
# Prune Model
# *****************
# https://medium.com/analytics-vidhya/weight-pruning-with-keras-86f742dbdb58

pruned_model = tfmot.sparsity.keras.prune_low_magnitude

epochs = 5
# Define model for pruning
pruning_params = {
  'pruning_schedule': tfmot.sparsity.keras.PolynomialDecay(initial_sparsity=0.50,
                                                           final_sparsity=0.80,
                                                           begin_step=0,
                                                           end_step=end_step)
}

pruned_model = prune_low_magnitude(model, **pruning_params)
  • Quantization-aware training example using keras
# based on https://www.tensorflow.org/model_optimization/guide/quantization/training_example
import os
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder, MinMaxScaler, StandardScaler

from keras.models import Sequential
from keras.layers import Dense
import tensorflow as tf

data = datasets.load_iris()

X = data['data']
Y = data['target']

# use and the scaled input the encoded output
enc = OneHotEncoder()
Y_enc = enc.fit_transform(Y[:, np.newaxis]).toarray()
Y = Y_enc

scaler = MinMaxScaler()
X_scaled = scaler.fit_transform(X)
X = X_scaled

X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.3, random_state=0)

num_features = X.shape[1]
num_classes = Y.shape[1]

batch_size = 1
epochs = 100


model = Sequential()
model.add(Dense(5, input_dim=num_features, activation='tanh'))
model.add(Dense(num_classes, activation='softmax'))
model.summary()

model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])

history = model.fit(X_train, Y_train,
                    batch_size=batch_size,
                    epochs=epochs,
                    verbose=1,
                    )

score_train = model.evaluate(X_train, Y_train, verbose=0)
print('Train loss:', score_train[0])
print('Train accuracy:', score_train[1])

score_test = model.evaluate(X_test, Y_test, verbose=0)
print('Test loss:', score_test[0])
print('Test accuracy:', score_test[1])



# import emlearn
# cmodel = emlearn.net.convert_keras(model, method='loadable') #methods = pymodule or loadable
# cmodel.save(file='iris_keras.h', name='iris')


# *******************
# Quantized aware model  (not really quantized yet)
# ******************
import tensorflow_model_optimization as tfmot

quantize_model = tfmot.quantization.keras.quantize_model

# q_aware stands for for quantization aware.
q_aware_model = quantize_model(model)

# `quantize_model` requires a recompile.
q_aware_model.compile(optimizer='adam',
              loss='categorical_crossentropy',
              metrics=['accuracy'])


q_aware_model.summary()


q_aware_history = q_aware_model.fit(X_train, Y_train,
                    batch_size=10,
                    epochs=1,
                    verbose=1,
                    )

q_aware_score_train = q_aware_model.evaluate(X_train, Y_train, verbose=0)
print('q_aware_Train loss:', q_aware_score_train[0])
print('q_aware_Train accuracy:', q_aware_score_train[1])

q_aware_score_test = q_aware_model.evaluate(X_test, Y_test, verbose=0)
print('q_aware_Test loss:', q_aware_score_test[0])
print('q_aware_Test accuracy:', q_aware_score_test[1])


# *******************
# Quantized model
# ******************
converter = tf.lite.TFLiteConverter.from_keras_model(q_aware_model)
converter.optimizations = [tf.lite.Optimize.DEFAULT] # check here

quantized_tflite_model = converter.convert()


# ******************
# Testing quantized model
# *****************
# ...
  • Post-training quantization example using tensorflow lite
import os
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder, MinMaxScaler, StandardScaler

from keras.models import Sequential
from keras.layers import Dense

import tensorflow as tf
import ipdb

data = datasets.load_iris()

X = data['data']
Y = data['target']

# use and the scaled input the encoded output
enc = OneHotEncoder()
Y_enc = enc.fit_transform(Y[:, np.newaxis]).toarray()
Y = Y_enc

scaler = MinMaxScaler()
X_scaled = scaler.fit_transform(X)
X = X_scaled

X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.3, random_state=0)

num_features = X.shape[1]
num_classes = Y.shape[1]

batch_size = 1
epochs = 100


model = Sequential()
model.add(Dense(5, input_dim=num_features, activation='tanh'))
model.add(Dense(num_classes, activation='softmax'))
model.summary()

model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])

history = model.fit(X_train, Y_train,
                    batch_size=batch_size,
                    epochs=epochs,
                    verbose=1,
                    )

score_train = model.evaluate(X_train, Y_train, verbose=0)
print('Train loss:', score_train[0])
print('Train accuracy:', score_train[1])

score_test = model.evaluate(X_test, Y_test, verbose=0)
print('Test loss:', score_test[0])
print('Test accuracy:', score_test[1])



# *****************
# Convert to TFlite
# *****************
# for more information: https://www.tensorflow.org/lite/models/convert
# more specifically in: https://www.tensorflow.org/lite/models/convert/convert_models

converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()


# Save the model.
model_file = 'iris_model.tflite'
with open(model_file, 'wb') as f:
  f.write(tflite_model)


# *****************
# Dynamic Range Post training quantization
# *****************
# https://www.tensorflow.org/lite/performance/post_training_quantization

converter = tf.lite.TFLiteConverter.from_keras_model(model)
converter.optimizations = [tf.lite.Optimize.DEFAULT]
tflite_dynamicrange_quant_model = converter.convert()


# Save the quantized model.
dynamicrange_quant_model_file = 'iris_model_quantized.tflite'
with open(dynamicrange_quant_model_file, 'wb') as f:
  f.write(tflite_dynamicrange_quant_model)

# *****************
# Integer-only Post training quantization
# *****************
# https://www.tensorflow.org/lite/performance/post_training_quantization#integer_only

converter = tf.lite.TFLiteConverter.from_keras_model(model)
converter.optimizations = [tf.lite.Optimize.DEFAULT]

# https://www.tensorflow.org/api_docs/python/tf/lite/RepresentativeDataset
# to learn about generators: https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do
def representative_dataset():
    for data in X_train:
      yield [data.astype(np.float32)]

converter.representative_dataset = representative_dataset
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8]
converter.inference_input_type = tf.int8  # or tf.uint8
converter.inference_output_type = tf.int8  # or tf.uint8

tflite_integer_quant_model = converter.convert()

# Save the quantized model.
integer_quant_model_file = 'iris_model_integer_quantized.tflite'
with open(integer_quant_model_file, 'wb') as f:
  f.write(tflite_integer_quant_model)
  • Use of EMLearn to export Python code to C
import os
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder, MinMaxScaler, StandardScaler

from keras.models import Sequential
from keras.layers import Dense


data = datasets.load_iris()

X = data['data']
Y = data['target']

# use and the scaled input the encoded output
enc = OneHotEncoder()
Y_enc = enc.fit_transform(Y[:, np.newaxis]).toarray()
Y = Y_enc

scaler = MinMaxScaler()
X_scaled = scaler.fit_transform(X)
X = X_scaled

X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.3, random_state=0)

num_features = X.shape[1]
num_classes = Y.shape[1]

batch_size = 1
epochs = 100


model = Sequential()
model.add(Dense(5, input_dim=num_features, activation='tanh'))
model.add(Dense(num_classes, activation='softmax'))
model.summary()

model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])

history = model.fit(X_train, Y_train,
                    batch_size=batch_size,
                    epochs=epochs,
                    verbose=1,
                    )

score_train = model.evaluate(X_train, Y_train, verbose=0)
print('Train loss:', score_train[0])
print('Train accuracy:', score_train[1])

score_test = model.evaluate(X_test, Y_test, verbose=0)
print('Test loss:', score_test[0])
print('Test accuracy:', score_test[1])


import emlearn
cmodel = emlearn.net.convert_keras(model, method='loadable') #methods = pymodule or loadable
cmodel.save(file='iris_keras.h', name='iris')