Common symbols or standards used for DSP block diagrams?

When creating high level block diagrams of DSP or signal processing, what symbols are typically used?

Are there any standards? For example its common to see gain to be a triangle. Whilst for a low pass filter, I have seen a few ways.

Assuming an absence of standards, whats a practical way of finding/referencing symbols? Was thinking there must be some reasonable comprehensive software packages, say like Simulink, that would have made an intelligent attempt at creating symbols. Or worse, review various DSP books? Can anybody recommend an approach or resource? In an ideal world, an open source project set of .svgs!

example

Are there any standards for flowchart data structures?

I’m often tasked with relatively complex flows that my employers will want to experiment with in regards to the amount of steps and their order. I’m a contractor and when my work is handed over to another developer, I’d like to ship something that is easy to understand quickly – and a flow with 10+ steps is quite the mouthful. So I’ve written a prototype that takes a homemade JSON data structure, which allows for

  1. Executing that data structure with a state object passed to all conditions and continuing through the true-path of the flowchart.
  2. Turning the data structure into a graph that can be visualized, like the example below.

Flowchart

The supported types are: Condition, Step/State and Terminate.

I’ve seen various flowchart designers out there and were wondering if it would make sense to implement at subset of their data structure, so the flowcharts can be changed in both code and a visual designer. Perhaps it would allow for the flowcharts to be executed in other programming languages, since my own implementation is made in TypeScript only.

Are there any standard for flowchart data structures, and/or are there any defacto standard tool for editing flowcharts that needs to also be executed?

This is the prototype. Please note that it is very, very much just a prototype!

import { inspect } from "util"
import { Graph, json, alg } from "graphlib"
import * as fs from "fs"

let predicates = {
    isSomeCondition2: () => false,
    IsCvrActive: () => false,
    shouldContactCustomerService: () => false,
    canDeliverProduct: () => true,
    isChangingSupplier: () => true,
    isSomeCondition: () => true,
    isReceipt: () => false
}

let flow =
{
    type: "Flow", name: "Primary flow", nodes: [
        { type: "Step", name: "Enter CVR" },
        {
            type: "Condition", name: "Is CVR Active?", predicateKey: "IsCvrActive",
            right: {
                type: "Step", name: "CVR is inactive",
                left: { type: "Terminate", name: "Terminate (inactive cvr)" }
            }
        },
        {
            type: "Condition", name: "Should contact customer service?", predicateKey: "shouldContactCustomerService",
            left: {
                type: "Step", name: "Contact customer service",
                left: { type: "Terminate", name: "Terminate (contact customer service)" }
            }
        },
        {
            type: "Condition", name: "Can deliver product?", predicateKey: "canDeliverProduct",
            right: {
                type: "Step", name: "Cannot deliver product",
                left: { type: "Terminate", name: "Terminate (cannot deliver product)" }
            }
        },
        {
            type: "Condition", name: "DataHub has PODs for CVR?", predicateKey: "isChangingSupplier",
            left: { type: "Flow", name: "Switch provider", nodes: [
                { type: "Step", name: "Power destination addresses" }
            ]},
            right: { type: "Flow", name: "Relocation", nodes: [
                { type: "Step", name: "Enter address" },
                { type: "Step", name: "Enter POD" },
                { type: "Step", name: "Enter estimated annual volume" },
                { type: "Step", name: "Enter latest meter reading" }
            ]}
        },
        { type: "Step", name: "First payment" },
        {
            type: "Condition", name: "What receipt?", predicateKey: "isReceipt",
            left: { type: "Step", name: "Receipt1" },
            right: { type: "Step", name: "Receipt2" }
        }]
}

let start = new Date()

//console.log("== EVALUATED")
//let evaluatedFlow = evaluateFlow(flow)
//console.log(evaluatedFlow)

var i = 0;

let graph = traverseFlow(flow)

console.log("PARENT Is this a condition?")
console.log(graph.parent('Is this a condition?'));

console.log("PARENT Enter CVR")
console.log(graph.parent('Enter CVR'));

console.log("== GRAPH")
var graphJson = json.write(graph)
fs.writeFileSync("./graph.html", writeHtml(graphJson));
//console.log(inspect(graphJson, { showHidden: false, depth: null }))

console.log("== MINIMUM STEPS")
//let minimumSteps = findMinimumSteps(graph)
//console.log(minimumSteps)

let end = new Date() - start
console.info("nnExecution time: %dms", end)

function findMinimumSteps(graph: Graph) {
    let root = graph.sources()[0]
    let sinks = graph.sinks().filter(node => graph.node(node).type !== "Terminate")
    let dijkstraResult = alg.dijkstra(graph, root, e => graph.node(e.w).type === "Condition" ? 0 : 1)
    console.log("=== DIJSKTRA")
    console.log(dijkstraResult)
    let shortestPath = sinks
        .map(node => dijkstraResult[node])
        .reduce((a, b) => a.distance < b.distance ? a : b)
    return shortestPath.distance + 1
}

function traverseFlow(flow: any, graph?: Graph, parent?: any): Graph {
    graph = graph || new Graph({ compound: true })
    let sinks = parent ? [parent.name] : graph.sinks()

    flow.nodes
        .map(createFlowGraph)
        .forEach((subGraph: Graph) => {

            subGraph.nodes().forEach(node => {
                graph.setNode(node, subGraph.node(node))
                let parentFlow = subGraph.parent(node) || flow.name
                if(graph.node(parentFlow)) {
                    graph.setParent(node, parentFlow)
                }
            })
            subGraph.edges().forEach(edge => graph.setEdge(edge, subGraph.edge(edge)))

            sinks.forEach(outNode => {
                let label = graph.node(outNode)
                if (label.type !== "Terminate" && label.type !== "Flow")
                    subGraph.sources().forEach(inNode => {
                        if(subGraph.node(inNode).type !== "Flow")
                            graph.setEdge(outNode, inNode, { label: label.type === "Condition" ? conditionLabel(label, inNode) : undefined })
                    })
            })

            let unconnectedConditions = subGraph.filterNodes(n =>
                subGraph.node(n).type === "Condition" && (subGraph.outEdges(n) || []).length === 1).nodes()

            sinks = subGraph.sinks().filter(node => subGraph.node(node).type !== "Flow").concat(unconnectedConditions)
        })

    return graph
}

function createFlowGraph(root: any): Graph {
    let graph = new Graph({ compound: true })
    traverseBinaryNode(graph, root)
    return graph
}

function conditionLabel(condition: any, node: any) {
    let { left, right } = condition

    if(left && left.type === "Flow")
        left = left.nodes[0]

    if(right && right.type === "Flow")
        right = right.nodes[0]

    if(left && left.name === node)
        return true

    if(right && right.name === node)
        return false

    return !!condition.right
}

function traverseBinaryNode(g: Graph, node: any, parent?: any) {

    if(node.type === "Flow")
        g.setNode(node.name, (Object).assign({}, node, {  label: node.name, clusterLabelPos: 'top', style: 'fill: #fff' }))
    else
        g.setNode(node.name, (Object).assign({}, node))

    if (node.type === "Flow")
        traverseFlow(node, g, parent)

    if (node.left)
        traverseBinaryNode(g, node.left, node)

    if (node.right)
        traverseBinaryNode(g, node.right, node)

    if (parent && node.type !== "Flow")
        g.setEdge(parent.name, node.name, { label: parent.type === "Condition" ? conditionLabel(parent, node.name) : undefined })
}

function evaluateFlow(flow: any) {
    let steps = []
    for (let node of flow.nodes) {
        if (!evaluateNode(node, steps))
            break
    }
    return steps
}

function evaluateNode(node: any, steps: any[]) {
    steps.push(node)

    switch (node.type) {
        case "Condition": {
            if (predicates[node.predicateKey]())
                return evaluateNode(node.left, steps)
            else if (node.right)
                return evaluateNode(node.right, steps)

            // Continue to the next binary tree in the flow
            return true
        }
        case "Step": {
            if (node.left)
                return evaluateNode(node.left, steps)

            // Continue to the next binary tree in the flow
            return true
        }
        case "Terminate": {
            // Stop evaluating the flow
            return false
        }
    }

    throw Error("Unknown node type")
}

function writeHtml(graphJson) {
    return `
    
    
        
        
        
        


        

        


        

        
    
    `
}

First do npm install graphlib then run with tsc file.ts && node file.js, then open graph.html

Does unilateral free trade (no trade barriers from anywhere) imply no standards?

Some people have proposed that after Brexit, the UK could adopt the “Singapore model” with unilateral free trade, and have no tariffs or non-tariff trade barriers from anywhere. For example, see The Telegraph, The Guardian, or this Conservative Home article. From the UK perspective, this would resolve the Irish border problem, as the UK Customs would not perform checks at the Irish Border, and it would be compatible with WTO Most Favoured Nation principles, as the UK would not perform checks from anywhere else, either (of course, the EU would still check its external customs border, including in Ireland).

Does this model imply that the UK could no longer have any product standards? Or could the UK under WTO rules still set standards on what can be legally sold in the UK, even when there are no limitations on what can be legally imported?

How to cite ISO or British Standards in LaTeX/BibTeX

I am trying to cite this British Standard in my Thesis, however using the usual @keysdoesn’t really seem to help make it clear, is there a more practical way to do this as it doesn’t really fall into any typical category?

@article{BSEN6232
,   author  = {British-Standard-Institution}
,   title   = {Part 2: Determination of density and porosity}
,   journal = {Advanced technical ceramics. Monolithic ceramics. Gerneral and textural properties.}
,   year    = {1993}
,   pages   = {1--16}
,   isbn    = {0580217728}
,   publisher   = {BSI}
,   institution = {British-Standard-Institution}
}

What are the general standards of good dialogue? [duplicate]

This question already has an answer here:

  • I’m getting tired of “he said” “she said” in dialogue; how do I get around it?

    5 answers

I try to avoid repeating the prosaic “he said”, “she said” structure as much as possible when writing dialogue.

Despite my vows, I found myself turning my head towards where he stood, intently conversing with the air. The air he likely was beginning to see as his fictional muse, Theresa—the ill-fated one who guides his path to redemption. I sidled up to him, tentatively, nails biting into the pale skin of my palms.

But I had vowed not to. By some miraculous stroke of luck, I had come to befriend two girls, who without question stood at the top of the popularity ladder. They had serious objections to much of the company I casually laughed and joked with—Noah being one of them. I knew in their eyes, he was just a wide-eyed blubbering jumble of a mess who wasn’t worth being around with. And if I were to continue bonding with them, I had to be careful to heed them. Glancing nervously around me to make sure the problematic duo weren’t around, I finally mustered up the courage to approach him. I had to make it quick. No one should find me talking with him. I took comfort in the fact that it was the library and not somewhere more public, somewhere it wasn’t teeming with the boys and girls of mischief, swagger and snickers.

“Practicing lines, are we?” My booming words had their intended effect. They abruptly snapped him out of whatever daze he had been in, making me feel rather guilty for disrupting his precious journey to far-away worlds of his own making. Noah had an extensive imagination—one that outstepped the boundaries of reality and convention. And I adored him all the more for it, although it isn’t exactly a trait that is usually much appreciated. All the more reason for the bullies to label him a dreamy fool who’s prone to colliding headfirst with walls.

Clearly ruffled at having been so roughly cut away from his trance, Noah took a moment to register my presence and went on to uncomfortably clear his throat. “Oh, Emma! Didn’t see you there.” He said in his usual, raspy voice. And then he backed it up with a short laugh, one that sounded severely out of place.

More often than not, catching him lost in his own thoughts caught him by surprise, as if he hadn’t known he had just talked to himself oblivious to the rest of the world. And these interactions always tended to border on the awkward what with him all flushed and edgy.

A few seconds flitted by with me biting my lips and thinking what to make of him. So I decide to throw in a “so, how’s things going?” in a pitiful attempt to make up for his social incompetence. But that unfortunately didn’t seem to get the conversation rolling too well. “Uhm…all’s fine.” He just didn’t get the clue, did he? I couldn’t put much blame on him, though. His parents unfortunately hadn’t had the time in their hands to teach him much by way of social mannerisms. They had passed away right after a bad bout of jaundice had swept over the Centineo family, leaving behind a clueless and wailing 1-year-old.

On any other Monday, I wouldn’t have went up to him at all. I had it fitted into my code of conduct to not butt in on him while he was at it. But I could tell that he had been wanting to say something to me for some time, but he had probably gotten put off by the two braid-swishing girls constantly at my heels.

Noah began pacing uncomfortably and scratching his head. “How’s the play going?” I said, hoping to steer the conversation to something that was more likely to generate more words from him.

His mouth bubbled up with unspoken words. “Em, happy birthday.” he let it out in one breath. His back relaxed, a great burden seemingly been lifted off him. Emmaline—my name was Emmaline but I held back from clarifying so.

Truth be told, I had forgotten all about my birthday. The event of my birth wasn’t exactly very memorable, considering how it ended with my mom. My dad found it challenging to deal with me and I knew it pained him to relive the day again and again each year. I didn’t press him on that too much either so my birthdays usually went uncelebrated. And birthdays soon faded into the recess of my mind.

I shyly twirled a stray curl which happened to fly over my forehead that very moment. “Umm….thanks.”

Some say good writers prefer simplicity and there’s art in simplicity and being able to pull off a dialogue with pretty much no descriptors as to how someone said something. Of course, we usually just say things when we say it. We don’t do it a certain way.

But I think overload of complex descriptors “he articulated”, “he intoned” is definitely crappy writing.

What is the general consensus on this matter, though? I would like to know others’ thoughts.